-
-
Notifications
You must be signed in to change notification settings - Fork 335
feat(xml-parser): Adds index and childCount (appendIndexInNodes optio… #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
gvillo
wants to merge
7
commits into
NaturalIntelligence:master
from
gvillo:add-index-childCount-xml-parser
Closed
feat(xml-parser): Adds index and childCount (appendIndexInNodes optio… #172
gvillo
wants to merge
7
commits into
NaturalIntelligence:master
from
gvillo:add-index-childCount-xml-parser
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ns prop). Adds tests
Closed
… tag type is self.
gvillo
commented
Jul 27, 2019
src/xmlstr2xmlnode.js
Outdated
attrNodeName: false, | ||
textNodeName: '#text', | ||
appendIndexInNodes: false, | ||
indexInNodesName: '#index', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to just index
or indexXmlPosition
, since you cannot use this prop in a javascript file because props cannot start with #
, it's a sintaxis error.
…ex to indexPos to be able to use it in js. NaturalIntelligence#173
# Conflicts: # spec/xmlParser_spec.js # src/xmlstr2xmlnode.js
Solved conflicts, feel free to reach me if you have any questions/suggestions |
# Conflicts: # yarn.lock
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose / Goal
Adds index to every child node to identify the original order on given XML. More info on Issue #173
Type
Please mention the type of PR
Performance Test BEFORE
GabrielsMBP:fast-xml-parser villo$ node benchmark/perfTest3.js
Running Suite: XML Parser benchmark
validation : 21246.883984142958 requests/second
xml to json : 17989.54813241312 requests/second
xml to json + json string : 15885.46499388386 requests/second
xml to json string : 2682.04659842737 requests/second
xml2js : 6192.755486464043 requests/second
Performance Test AFTER
GabrielsMBP:fast-xml-parser villo$ node benchmark/perfTest3.js
Running Suite: XML Parser benchmark
validation : 21089.960179732523 requests/second
xml to json : 17787.686907309126 requests/second
xml to json + json string : 16353.244154453696 requests/second
xml to json string : 2708.111563294958 requests/second
xml2js : 6201.116585927645 requests/second
Performance Test AFTER (index of arrays/objects enabled)
xml to json (index to arrays/object enabled) : 15191.607136661647 requests/second
xml to json + json string (index to arrays/object enabled) : 11922.822294326417 requests/second
xml to json string (index to arrays/object enabled) : 2553.678400083379 requests/second