Hi, I'm using ElementTree for some RSS processing. The point where I face a problem is that within an <item></item> I need to add another child node (in addition to <link> etc) which is a well-formed XML document (Chemical Markup Language to be precise).
So my code looks like: import cElementTree as ET c = open('x.cml').readlines() c = string.join(c) cml = ET.XML(c) Now I also have the following code: def addItem(self, title, link, description, cml = None): RSSitem = ET.SubElement ( self.RSSchannel, 'item' ) ET.SubElement( RSSitem, 'title' ).text = title ET.SubElement( RSSitem, 'description' ).text = description What I'm confused is how I can add the cml Element object that I generated, to the RSSitem as a child node. Do I need to manually traverse the tree of the CML document and add it one by one to the RSSitem as a child node? Or is there a smarter way to do this? Any pointers would be greatly appreciated Thanks, Rajarshi -- http://mail.python.org/mailman/listinfo/python-list