We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
xml-js trims off the spaces in the text following each other
<some>some text </some>
converts to:
{type: "text", "text: "some text "} // where are my spaces??
OR
<some> <some>
{type: "element", name: "some"} // And that's it. Where is my text with empty space?
The text was updated successfully, but these errors were encountered:
@malikiz Are you set trim options? Your example works well in my computer (xml-js v1.6.11)
trim
Sorry, something went wrong.
What about this example? How do I find out how many spaces are present in the text?
console.log(convert.xml2json('<some> </some>'))
{"elements":[{"type":"element","name":"some"}]}
I found the captureSpacesBetweenElements property in the sources, but I didn't find it in the documentation. I think this will work for me.
captureSpacesBetweenElements
No branches or pull requests
xml-js trims off the spaces in the text following each other
converts to:
OR
converts to:
The text was updated successfully, but these errors were encountered: