Streaming elements not directly below the root
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- erlang
- Domain
- backend
Research direction
Start with fxml_stream:parse/2 and the streaming behavior described for the nested RangeResult and Detail elements. Trace how the parser chooses the element included in the emitted xmlstreamelement message, then verify the result against the example document and confirm that each Detail is delivered separately.
Written by the indexing model from the issue text.
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
- Dominant language
- Erlang
- Stars
- 138
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from processone/fast_xml
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
processone/fast_xml#52 ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
processone/fast_xml#31 · 1 comment ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
processone/fast_xml#25 · 1 comment ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
processone/fast_xml#21 · 5 comments ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
processone/fast_xml#5 · 7 comments ·
All issues in processone/fast_xml
Similar issues
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
needs-triage sig/api-machinery
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes/kubernetes#142651 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue hacktoberfest help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
libredb/libredb-studio#1291 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100