darelf
07-02-2002, 05:20 PM
Here's what I want to accomplish:
Have descriptive text embedded in the xml document with html tags, i.e. This is in bold.
if I do this:
from xml.dom.minidom import *
d = parse('myfile.xml')
e = d.getElementsByTagName('desc')
x = e[0].firstChild
The value of the text node in x ends up like this:
<b>This is in bold.</b>
Which would be ok, but how do I turn it back? Or should I worry? I'll be passing the string to a Qt RichText widget, which is expecting "html"-type input.
Or should I be using a different method of storing this stuff altogether?
Have descriptive text embedded in the xml document with html tags, i.e. This is in bold.
if I do this:
from xml.dom.minidom import *
d = parse('myfile.xml')
e = d.getElementsByTagName('desc')
x = e[0].firstChild
The value of the text node in x ends up like this:
<b>This is in bold.</b>
Which would be ok, but how do I turn it back? Or should I worry? I'll be passing the string to a Qt RichText widget, which is expecting "html"-type input.
Or should I be using a different method of storing this stuff altogether?