MCPcopy Create free account
hub / github.com/antchfx/xmlquery / CreateStreamParser

Function CreateStreamParser

parse.go:449–451  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

447// streamElementFilter, if provided, cannot be successfully parsed and compiled
448// into a valid xpath query.
449func 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
454func CreateStreamParserWithOptions(

Callers 5

TestCDATAFunction · 0.85

Calls 1

Tested by 5

TestCDATAFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…