-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
Description
Hello! First, thank you for this library. I'm very happy with the performance improvement over xmerl.
I have a large XML document I wish to stream, it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<tns:Envelope xmlns:tns="urn:Service:Integration">
<tns:Body>
<tns:RangeResponse>
<tns:RangeResult>
<tns:Detail> ...more content here... </tns:Detail>
<tns:Detail> ...more content here... </tns:Detail>
<tns:Detail> ...more content here... </tns:Detail>
<tns:Detail> ...more content here... </tns:Detail>
<tns:Detail> ...more content here... </tns:Detail>
<tns:Detail> ...more content here... </tns:Detail>
... and so on...
</tns:RangeResult>
</tns:RangeResponse>
</tns:Body>
</tns:Envelope>I wish to process each Detail element in turn, getting messages like so:
{'$gen_event', {xmlstreamelement, {xmlel, "Detail", [], ...}}}However when I stream this document by passing each line to fxml_stream:parse/2 I get a single message containing the Body element, meaning I am parsing and processing the Detail elements eagerly.
Is it possible to instruct fast_xml to use RangeResult as the root?
Thanks,
Louis
thbar