In <[email protected]> Doug OLeary 
<[email protected]> writes:

> >>> from lxml import etree
> >>> doc =3D etree.parse('config.xml')

> Now what?  For instance, how do I list the top level children of
> <domain>?

root = doc.getroot()
for child in root:
    print(child.tag)

-- 
John Gordon                   A is for Amy, who fell down the stairs
[email protected]              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to