Skip to content

Commit 7e66f96

Browse files
committed
update README.me
1 parent f1a827c commit 7e66f96

File tree

1 file changed

+11
-58
lines changed

1 file changed

+11
-58
lines changed

README.md

Lines changed: 11 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ Overview
1010

1111
jsonquery is an XPath query package for JSON document, lets you extract data from JSON documents through an XPath expression. Built-in XPath expression cache avoid re-compile XPath expression each query.
1212

13+
14+
XPath query for Golang
15+
===
16+
17+
- [htmlquery](https://github.com/antchfx/htmlquery) - XPath query package for HTML document
18+
19+
- [xmlquery](https://github.com/antchfx/xmlquery) - XPath query package for XML document.
20+
21+
- [jsonquery](https://github.com/antchfx/jsonquery) - XPath query package for JSON document
22+
23+
1324
Getting Started
1425
===
1526

@@ -115,61 +126,3 @@ func main() {
115126
}
116127
}
117128
```
118-
119-
Implement Principle
120-
===
121-
If you are familiar with XPath and XML, you can easily figure out how to
122-
write your XPath expression.
123-
124-
```json
125-
{
126-
"name":"John",
127-
"age":30,
128-
"cars": [
129-
{ "name":"Ford", "models":[ "Fiesta", "Focus", "Mustang" ] },
130-
{ "name":"BMW", "models":[ "320", "X3", "X5" ] },
131-
{ "name":"Fiat", "models":[ "500", "Panda" ] }
132-
]
133-
}
134-
```
135-
The above JSON document will be convert to similar to XML document by the *JSONQuery*, like below:
136-
137-
```XML
138-
<name>John</name>
139-
<age>30</age>
140-
<cars>
141-
<element>
142-
<name>Ford</name>
143-
<models>
144-
<element>Fiesta</element>
145-
<element>Focus</element>
146-
<element>Mustang</element>
147-
</models>
148-
</element>
149-
<element>
150-
<name>BMW</name>
151-
<models>
152-
<element>320</element>
153-
<element>X3</element>
154-
<element>X5</element>
155-
</models>
156-
</element>
157-
<element>
158-
<name>Fiat</name>
159-
<models>
160-
<element>500</element>
161-
<element>Panda</element>
162-
</models>
163-
</element>
164-
</cars>
165-
```
166-
167-
Notes: `element` is empty element that have no any name.
168-
169-
List of XPath query packages
170-
===
171-
|Name |Description |
172-
|--------------------------|----------------|
173-
|[htmlquery](https://github.com/antchfx/htmlquery) | XPath query package for the HTML document|
174-
|[xmlquery](https://github.com/antchfx/xmlquery) | XPath query package for the XML document|
175-
|[jsonquery](https://github.com/antchfx/jsonquery) | XPath query package for the JSON document|

0 commit comments

Comments
 (0)