Bruno, Thanks, but the whole reason I need it is to create objects in the tree on the fly. Every implementation I've seen of Element tree manually assigns values to the nodes and manually places them. All I care about is that any tags they have are in my list of "valid_tags". Otherwise they can be in any order, etc. For instance they could have: <book> <title>the good one</title> <author>ted</author> <year>1945</year> </book> or <book> <year>1945</year> <title>the good one</title> <author>ted</author> </book> I want to avoid the line by line assignments like this: if name == "book": # do book stuff if name == "title": #do title stuff I want to assign objects on the fly: if name in valid_tags: object = Element(name) if condition: object = SubElement(Super, object) I'd still need an algorithm that walked the tree and created it for me. That way, if in fact I decide to allow more XML tags in the future, it's simply a matter of adding a few "valid_tags" to the list and it automatically allows them to be created. Does that make any sense? Thanks again, Michael On Dec 7, 2005, at 5:20 AM, [EMAIL PROTECTED] wrote:
|
-- http://mail.python.org/mailman/listinfo/python-list