Re: [lxml-dev] redundant namespace declarations

Hi, On Mon, Dec 04, 2006 at 06:44:28PM +0100, Stefan Behnel wrote:
Well, maybe that won't be that soon. It's currently undecided if this will be in the next release, so it will stay out of the trunk for now.
No problem. I've adapted the code responsible for building the element tree to use SubElement instead of append, so that "pretty_print = True" does what I want. A minor problem remains, but I have a workaround for this. If you try to write the document to a file without write access, "write_c14n" raises a C14NError:
But if you use "write" instead, lxml silently ignores the fact that the file can't be written:
et.write("notwritable.xml")
For now, I'm just writing to a StringIO buffer and open the file manually, so this is no serious problem for me. But others might well be bitten by this bug, even more so since lxml does not give any feedback about what just happened. Best regards, Albert Brandl
participants (2)
-
Albert Brandl
-
Stefan Behnel