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

add whole document serialization via toString(whole=true, compressed=true) #4

Merged
merged 1 commit into from
Jan 24, 2014

Conversation

jankuca
Copy link
Contributor

@jankuca jankuca commented Sep 15, 2013

This makes it possible to serialize the whole document/subtree as a usable valid XML string.

doc.toString() // -> as before, trimmed and indented
doc.toString(true) // -> untrimmed and indented
doc.toString(true, true) // -> untrimmed and unindented
doc.toString(false, true) // -> trimmed and unindented

@jankuca jankuca mentioned this pull request Sep 15, 2013
@daronco
Copy link

daronco commented Jan 24, 2014

+1

nfarina added a commit that referenced this pull request Jan 24, 2014
add whole document serialization via toString(whole=true, compressed=true)
@nfarina nfarina merged commit a269b9b into nfarina:master Jan 24, 2014
@nfarina
Copy link
Owner

nfarina commented Jan 24, 2014

Sorry, I don't know how I missed this before, should have merged this forever ago! Thanks for the patch.

@nfarina
Copy link
Owner

nfarina commented Jan 24, 2014

I just pushed some tweaks to this, FYI. Introduced an options style object for these formatting options, and changed the default toString() behavior to be more intuitive.

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

Successfully merging this pull request may close these issues.

3 participants