[XML-SIG] pulldom CHARACTERS problem

Grant Morganryuuguu grant at ryuuguu.com
Fri Mar 11 03:54:52 CET 2005

I am having a problem with only getting part of characters in CHARACTERS node.
I am using code like this

doc = xml.dom.pulldom.parse(inFile)
event,node  = iter.next()
if event == 'CHARACTERS':
     char =self.node.nodeValue

In my small tests it works fine but with a large file (2MB) errors start occuring.
XML like


sometimes produces char== 'N' or 'Na' where and what it produces varies if I remove some nodes at the begining of the file. the nodes I remove seem parse fine but which later node parses wrong changes.  I though maybe it was related a buffering problem but this only a 4 character string. I tried changing the buffering to line buffering-- parse(inFile,None,1) --as the phrase <key>Name</key> always occurs on one line, this had no affect.
I tried this with both python 2.3.5 and 2.4 I have not installed pyXML

Any suggestions would be appreciated.


More information about the XML-SIG mailing list