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

Allow pretty printing XML in unparse() #26

Closed
martinblech opened this issue Jun 15, 2013 · 1 comment
Closed

Allow pretty printing XML in unparse() #26

martinblech opened this issue Jun 15, 2013 · 1 comment

Comments

@martinblech
Copy link
Owner

xmltodict should have the option to pretty print XML with correct indentation. The default behavior should stay the same (print all inline), and this new feature should only be enabled with an optional argument to unparse().

@martinblech
Copy link
Owner Author

I think the right, robust way to do this is by leaving XMLGenerator untouched and modifying our own _emit function to pass a depth parameter to itself and call content_handler.ignorableWhitespace() appropriately.

martinblech added a commit that referenced this issue Aug 18, 2013
Implements the enhancement proposed in #26
martinblech added a commit that referenced this issue Aug 18, 2013
Implements the enhancement proposed in #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant