Skip to content
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

Order of elements changed #41

Closed
benlowry opened this issue Dec 12, 2016 · 1 comment
Closed

Order of elements changed #41

benlowry opened this issue Dec 12, 2016 · 1 comment

Comments

@benlowry
Copy link

benlowry commented Dec 12, 2016

I have a pretty standard signin form I'm parsing and when converting back to a string the order changes:

<label for='checkbox'>
    <input id='checkbox' name='checkbox' />
    Remember I'm signed in
</label>

Becomes:

<label for='checkbox'>
    Remember I'm signed in
    <input id='checkbox' name='checkbox' />
</label>
@nfarina
Copy link
Owner

nfarina commented Dec 12, 2016

This is expected I'm afraid - the document structure discards the order information of text nodes as they relate to element nodes. Remember that xmldoc is only intended to be a read-only library and toString() is for debugging only! XML "round trip" correctness is not guaranteed.

@nfarina nfarina closed this as completed Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants