设为首页 加入收藏

TOP

GraphQuery - Powerful html/xml query language(一)
2019-09-17 17:35:56 】 浏览:43
Tags:GraphQuery Powerful html/xml query language

GraphQuery CircleCI Go Report Card Build Status Coverage Status GoDoc Gitter chat

GraphQuery

GraphQuery is a query language and execution engine tied to any backend service. It is back-end language independent.

Project Address: GraphQuery

Related Projects:

Overview

GraphQuery is an easy to use query language, it has built-in Xpath/CSS/Regex/JSONpath selectors and enough built-in text processing functions.
The most amazing thing is that you can use the minimalist GraphQuery syntax to get any data structure you want.

Language-independent

Use GraphQuery to let you unify text parsing logic on any backend language.
You won't need to find implementations of Xpath/CSS/Regex/JSONpath selectors between different languages ??and get familiar with their syntax or explore their compatibility.

Multiple selector syntax support

You can use GraphQuery to parse any text and use your skilled selector. GraphQuery currently supports the following selectors:

  1. Jsonpath for parsing JSON strings
  2. Xpath and CSS for parsing XML/HTML
  3. Regular expressions for parsing any text.

You can use these selectors in any combination in GraphQuery. The rich built-in selector provides great flexibility for your parsing.

Complete function

Graphquery has some built-in text processing functions like trim, template, replace. If you think these functions don't meet your needs, you can register new custom functions in the pipeline.

Clear data structure & Concise grammar

With GraphQuery, you won't need to look for parsing libraries when parsing text, nor do you need to write complex nesting and traversal. Simple and clear GraphQuery syntax gives you a clear picture of the data structure.

compare

As you can see from the comparison chart above, the syntax of GraphQuery is so simple that even if you are in touch with it for the first time, you can still understand its meaning and get started quickly.

At the same time, GraphQuery is also very easy to integrate into your backend data system (any backend language), let's continue to look down.

Getting Started

GraphQuery consists of query language and pipelines. To guide you through each of these components, we've written an example designed to illustrate the various pieces of GraphQuery. This example is not comprehensive, but it is designed to quickly introduce the core concepts of GraphQuery. The premise of the example is that we want to use GraphQuery to query for information about library books.

1. First example

<library>
<!-- Great book. -->
<book id="b0836217462" available="true">
    <isbn>0836217462</isbn>
    <title lang="en">Being a Dog Is a Full-Time Job</title>
    <quote>I'd dog paddle the deepest ocean.</quote>
    <author id="CMS">
        <?echo "go rocks"?>
        <name>Charles M Schulz</name>
        <born>1922-11-26</born>
        <dead>2000-02-12</dead>
    </author>
    <character id="PP">
        <name>Peppermint Patty</name>
        <born>1966-08-22</born>
        <qualification>b
首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇[原创]分布式系统之缓存的微观应.. 下一篇java 进销存 crm 客户管理 库存管..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目