Skip to content

Commit

Permalink
docs: fix library reference in example
Browse files Browse the repository at this point in the history
  • Loading branch information
tsak committed Jun 12, 2019
1 parent 4d215ab commit 27288c7
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, "books")

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, "books").SkipElements([]string{"price", "comments"})
```

<b>Error</b> handlings
Expand Down

0 comments on commit 27288c7

Please sign in to comment.