DOM - some pointers (fwd)
Dr. David Mertz
mertz at gnosis.cx
Tue Dec 18 18:36:25 EST 2001
"Andrew Dalke" <dalke at dalkescientific.com> wrote:
|I would prefer an API which is more like
|for entry in doc["entry"]:
| if entry["account"][0].text == "dalke":
| entry["shell"][0].text = "/bin/bash"
| break
|and not have to worry about the normalization and explicit
|use of firstChild.
You might want to look at my [xml_objectify] module. It wraps XML
processing in more Pythonic feeling object structures, and is quite
transparent to use. OTOH, [xml_objectify] is really about *reading* XML
documents into Python objects... it doesn't write back changes
particularly seamlessly.
More information about the Python-list
mailing list