I'm new to XML and handling whitespace seems to be an unresolved issue.
You might want to look up the "xml:space" attribute, and "whitespace normalization" (e.g., XPath 1.0)
Is this behavior by design?
Yes. Note that the name is "toprettyxml" not just "dump" or "print" -- it's designed to make the output pretty, not to make the output be exactly like the input.
/r$
-- Rich Salz, Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html XML Security Overview http://www.datapower.com/xmldev/xmlsecurity.html _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig