CreateStreamParser creates a StreamParser. Argument streamElementXPath is required. Argument streamElementFilter is optional and should only be used in advanced scenarios. Scenario 1: simple case: xml := ` b1 b2 ` sp, err := CreateStreamParser(strings.NewReader(xml)
(r io.Reader, streamElementXPath string, streamElementFilter ...string)
| 447 | // streamElementFilter, if provided, cannot be successfully parsed and compiled |
| 448 | // into a valid xpath query. |
| 449 | func CreateStreamParser(r io.Reader, streamElementXPath string, streamElementFilter ...string) (*StreamParser, error) { |
| 450 | return CreateStreamParserWithOptions(r, ParserOptions{}, streamElementXPath, streamElementFilter...) |
| 451 | } |
| 452 | |
| 453 | // CreateStreamParserWithOptions is like CreateStreamParser, but with custom options |
| 454 | func CreateStreamParserWithOptions( |
searching dependent graphs…