[lxml-dev] ElementTree docinfo attribute

David Soulayrol dsoulayrol at free.fr
Fri Aug 22 17:50:10 CEST 2008


Hello,

I can read at
http://article.gmane.org/gmane.comp.python.lxml.devel/1106/match=docinfo

"a DocInfo object that you can also instantiate on an ElementTree (or
Element) by hand."

But I also can read from _ElementTree help : 

"docinfo: Information about the document provided by parser and DTD.
This value is only defined for ElementTree objects based on the root
node of a parsed document (e.g.  those returned by the parse
functions)."


In any case, the docinfo property of ElementTree seems read only. So
please tell me, is it possible to fill the docinfo property of an
ElementTree by hand, or is it necessary to use the etree parse method ?

Thanks.
-- 
David.



More information about the lxml-dev mailing list