Skip to content

Commit

Permalink
Merge pull request #2 from tsak/fix/readme
Browse files Browse the repository at this point in the history
Small fixes to README
  • Loading branch information
tamerh authored Jun 12, 2019
2 parents 4d215ab + a86dd35 commit 89b6126
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ xml-stream-parser is xml parser for GO. It is efficient to parse large xml data

<b>Stream</b> over books
```go


f, _ := os.Open("input.xml")
br := bufio.NewReaderSize(f,8192)
parser := pr.NewXmlParser(br, "books")
parser := xmlparser.NewXmlParser(br, "book")

for xml := range *parser.Stream() {
fmt.Println(xml.Childs["title"][0].InnerText)
Expand All @@ -41,7 +43,7 @@ for xml := range *parser.Stream() {

<b>Skip</b> tags for speed
```go
parser := pr.NewXmlParser(br, "books").SkipElements([]string{"price", "comments"})
parser := xmlparser.NewXmlParser(br, "book").SkipElements([]string{"price", "comments"})
```

<b>Error</b> handlings
Expand Down

0 comments on commit 89b6126

Please sign in to comment.