Suggestions for Python XML library which can search and insert

uche.ogbuji at gmail.com uche.ogbuji at gmail.com
Fri Jul 29 19:39:22 EDT 2005


"I'm looking for a library that can search through an XML document
tree,
locate an element by attribute (ideally this can be done through
XPath), and insert an element (as its child).

Simple? Yes? ...but the code I've seen so far which does this uses
'nested for loops' for trees which are relatively shallow compared to
mine. "

Amara can easily do this using XPath (complete with predicates,
functions, etc.), without nested for loops:

http://uche.ogbuji.net/tech/4Suite/amara/

-- 
Uche
http://uche.ogbuji.net




More information about the Python-list mailing list