Ilpo Nyyssönen wrote:
Stefan Behnel <behnel_ml@gkec.informatik.tu-darmstadt.de> writes:
Does this include pretty printing? Is it possible not to strip the declaration? Or do I have to continue patching lxml for my use?
Maybe, depending on why you patch it and how. This is open-source software. If you have a patch that adds a feature you need and have an interest in stopping to patch it yourself, you send a patch to the mailing list to have it included. Then we will discuss it and see if we can include it or what else we can do to add the missing feature.
Both of these were in a patch by someone else earlier, try google("lxml pretty print") for example. Of course that probably won't apply any more as is.
I know about that patch, it was written by Geert Jansen resp. Patrick Wagstrom. And it will definitely not apply to 1.0. I rewrote the patch as simple as possible. The trunk now has support for the "pretty_print" keyword we discussed at that time. I preferred the keyword over a more general "XMLWriter" class approach, after Fredrik told me that ET 1.3 will have an "xml_declaration" keyword in the tostring function, so this is more consistent. Stefan