prewk / xml-string-streamer

Stream large XML files with low memory consumption.
MIT License
356 stars 49 forks source link

getExtractedContainer() undefined? #74

Closed TORCommunity closed 3 years ago

TORCommunity commented 3 years ago

I'm trying to use the getExtractedContainer() function mentioned in the docs but it's saying it's undefined. Was the code removed?

prewk commented 3 years ago

Hi, see the code example on https://github.com/prewk/xml-string-streamer#accessing-the-root-element-version-070 in the readme.

It sounds like you're trying to access a global function, but the thing you're after is a method on the parser.

Both parsers implement an interface which has the method (see https://github.com/prewk/xml-string-streamer/blob/1449d07bbfe24800a2188d6e3fd68dfc6035d38e/src/XmlStringStreamer/ParserInterface.php#L33) so it's impossible for it to be undefined.

Good luck and happy New Years!