Skip to content

Commit

Permalink
docs: change books to book in sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
tsak committed Jun 12, 2019
1 parent 27288c7 commit a86dd35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ xml-stream-parser is xml parser for GO. It is efficient to parse large xml data

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

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

<b>Skip</b> tags for speed
```go
parser := xmlparser.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 a86dd35

Please sign in to comment.