XML DOM: XML/XHTML inside a text node
rnd at onego.ru
Thu Nov 3 07:07:02 CET 2005
On Thu, 2 Nov 2005 noahlt at gmail.com wrote:
> 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?
What about parsing the input into XML first? Is there any point in including
unescaped code into XML document unless it is XML itself?
Sincerely yours, Roman Suzi
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
More information about the Python-list