fix #593: support metadata on nodes (5.x edition)#729
fix #593: support metadata on nodes (5.x edition)#729amitguptagwl merged 9 commits intoNaturalIntelligence:metadatafrom
Conversation
- add a new symbol, accessible via XMLParser.getStartIndexSymbol() which reflects the start index of a tag - copy that start index in the compressed form as well (cherry picked from commit d7601c3)
- correct .d.ts
|
Tests fail as they don't expect the symbols to be present. Tests passed on the 4.x version, perhaps a change in Jasmine now fails. |
- change to use a different fast-xml-parser PR, NaturalIntelligence/fast-xml-parser#729 Fixes: #10622
- add a preserveStartIndex option, off by default - use an ordinary property if Symbol is not available - update tests and docs
|
Benchmark before (but see #730 ! ) Benchmark after: |
|
@amitguptagwl ready to merge to 'metadata' |
|
Can you please change |
- add a captureMetaData which adds a metadata object - update tests and typings
please take a look at the update now. (didn't update docs yet) |
|
Thanks Steven, Can you please add tests for following?
|
|
Will do
El El lun, 17 mar 2025 a la(s) 7:57 p.m., Amit K Gupta <
***@***.***> escribió:
… Thanks Steven, Can you please add tests for following?
- isArray is true
- stopNodes is set
- unpairedTags is set
- updateTag change tag name
—
Reply to this email directly, view it on GitHub
<#729 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGQZM6BEWSR7CHAVIX57DD2U5VRJAVCNFSM6AAAAABYC3GZY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMZRGMYDCNRUGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: amitguptagwl]*amitguptagwl* left a comment
(NaturalIntelligence/fast-xml-parser#729)
<#729 (comment)>
Thanks Steven, Can you please add tests for following?
- isArray is true
- stopNodes is set
- unpairedTags is set
- updateTag change tag name
—
Reply to this email directly, view it on GitHub
<#729 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGQZM6BEWSR7CHAVIX57DD2U5VRJAVCNFSM6AAAAABYC3GZY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMZRGMYDCNRUGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I would be able to merge this PR after 3rd Apr. |
- add test for captureMetadata && isArray && stopNodes && unpairedTags && updateTag
|
@amitguptagwl take a look, see if the test is right. still need to update docs |
- update documentation - update fxp.d.ts for metadata
|
@amitguptagwl docs updated |
|
Thanks for the changes. I'll have a look by tomorrow and confirm. |
|
can you please update the fxp.d.cjs too? Please also merge latest changes of metadata branch. |
|
how do i update fxp.d.cjs? |
|
the .cts - yes,
but does https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/lib/fxp.cjs also need to be updated? maybe with webpack |
- remove duplicate X2jMetadata class - update .cts file with metadata
|
@amitguptagwl updated .cts |
|
@amitguptagwl merged up to date |
|
changes are live. Thanks for your patience and apologies for delay. |
Purpose / Goal
For our XML based parser, we want to show the line number of where an errant XML element was found.
This PR adds a symbol to objects in the output tree with the start index (in chars) of the element.
Fixes #593
Type
Please mention the type of PR
Benchmark
(TBD)
Bookmark this repository for further updates.