DTD Parsing

Stefan Behnel stefan_ml at behnel.de
Wed Nov 10 17:53:54 EST 2010


Felipe Bastos Nunes, 10.11.2010 13:34:
> Does any, libxml2 or lxml, collect children like jdom does in java?
>      List<Element>  children = myRoot.getChildren();

Bah, that's *so* Java. ;)

ElementTree and lxml.etree do it like this:

     children = list(myRoot)

lxml also supports XPath and lots of other helpful stuff.

Stefan




More information about the Python-list mailing list