[lxml-dev] doctype declarations in XML output

Stefan Behnel behnel_ml at gkec.informatik.tu-darmstadt.de
Fri Oct 20 09:49:08 CEST 2006


Hi,

Raymond Wiker wrote:
> Hi. I've just started using Python 2.5 and lxml.etree, and am very
> happy so far - with this combination, I have an easy-to-use XML
> solution that includes good XPath and XSLT support.

Always happy to hear that.


> One question: is it possible to add doctype definitions to the output?
> I have not been able to find anything about this in the documentation,
> and I cannot see any references to xmlCreateIntSubset or xmlNewDtd in
> the source code. These should be trivial to add, as far as I can see.

There's not currently any support for that. However, we might consider making
_Element.docinfo writable to achieve this.

Any patches are welcome.

Stefan



More information about the lxml-dev mailing list