XML DOM: XML/XHTML inside a text node

noahlt at gmail.com noahlt at gmail.com
Thu Nov 3 00:05:55 EST 2005


In my program, I get input from the user and insert it into an XHTML
document.  Sometimes, this input will contain XHTML, but since I'm
inserting it as a text node, xml.dom.minidom escapes the angle brackets
('<' becomes '<', '>' becomes '>').  I want to be able to
override this behavior cleanly.  I know I could pipe the input through
a SAX parser and create nodes to insert into the tree, but that seems
kind of messy.  Is there a better way?

Thanks.




More information about the Python-list mailing list