[XML-SIG] CDATA sections still not handled

matt matt@virtualspectator.com
Tue, 16 Jan 2001 10:45:29 +1300


I'm using PyXML 0.6.3 and python 1.5.2.  It seems that CDATA sections are still
not handled correctly.  The following code demonstrates.  



test_xml = """<?xml version='1.0' encoding='ISO-8859-1'?>
<item_20001204_035952>
  <one>
      <caption>a test caption</caption>
  </one>
  <![CDATA[some test data]]>
</item_20001204_035952>"""
 
 
from xml.dom import ext
from xml.dom.ext.reader import Sax2
from xml.sax import saxexts
 
a_parser = saxexts.XMLParserFactory.make_parser('xml.sax.drivers.drv_pyexpat')
 
doc = Sax2.FromXml(test_xml,None,parser=a_parser, validate=0)
ext.PrettyPrint(doc,encoding='ISO-8859-1') 



from this I get the CDATA element returning as a text node
<Text Node at 818a8b0: data = '\0xa  some test data\0xa'> 



regards
Matt