-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
How to put the text in the front of a tag when parse a xml? #669
Comments
We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo. |
do you mean the indentation of tag's text is not as per expectation? |
@amitguptagwl Sorry, I make a mistake. The builder can build tag's text in right order, what i want is changing the parse order of tag's text, so the builder can build the text before the child tag. I have changed the title and description of this topic, pls have a look. |
This should solve your issue: https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/docs/v4/2.XMLparseOptions.md#preserveorder |
@amitguptagwl When preserveOrder: true , you get some long ugly result. |
@wxfred In JS, you can ensure the sequence of properties. This is not the issue with this library. Hence, that;s the only solution. |
Input
Output by
Desired output
If i rebuild the output,
the rebuild result of Output 1 is
the rebuild result of Output 2 is below, and the order of tag's text is the same as the Input, this is what i want
The text was updated successfully, but these errors were encountered: