Hi all,

            I am working on SunOS 5.8,  Python 2.2.2

            When I run the python grogram below:

 

#Beginning

import xml.dom.minidom

 

xml_str = """\

<test>

<a>&apos; this is a</a>

<b>c&apos; this is b</b>

<c>this is c</c>

</test>

"""

 

dom = xml.dom.minidom.parseString(xml_str)

 

na = dom.getElementsByTagName("a")[0]

nb = dom.getElementsByTagName("b")[0]

nc = dom.getElementsByTagName("c")[0]

 

print na.childNodes[0].data

print nb.childNodes[0].data

print nc.childNodes[0].data

#End

 

            The result is as below:

" this is a

c

this is c

 

            I don't know why the letters following the quote are lost.
Even the quote lost if the quote following another letter.

 

Regards,

Sean

 



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to