[XML-SIG] DOM ProcessingInstruction problem
Jeff.Johnson@stn.siemens.com
Jeff.Johnson@stn.siemens.com
Thu, 12 Nov 1998 11:42:17 -0500
I came across an exception (see below) when calling core.Document.toxml().
I made a temporary fix to core.py which is at the bottom of this email. I
don't know if the line I added is the way to fix the problem or if all
references to "_node.target" should be changed to "_node.data". And please
don't forget about adding support for comments (or tell me why you won't).
Traceback (innermost last):
File "cml.py", line 64, in ?
test('cmlexc01.xml','cml.htm')
File "cml.py", line 59, in test
c.readSgml(fileNameIn)
File "cml.py", line 23, in readSgml
print "HI JEFF",self.sgml.toxml()
File "C:\Python\xml\dom\core.py", line 931, in toxml
s = s + n.toxml()
File "C:\Python\xml\dom\core.py", line 670, in toxml
s = s + n.toxml()
File "C:\Python\xml\dom\core.py", line 670, in toxml
s = s + n.toxml()
File "C:\Python\xml\dom\core.py", line 670, in toxml
s = s + n.toxml()
File "C:\Python\xml\dom\core.py", line 670, in toxml
s = s + n.toxml()
File "C:\Python\xml\dom\core.py", line 670, in toxml
s = s + n.toxml()
File "C:\Python\xml\dom\core.py", line 901, in toxml
return "<? " + self._node.name + ' ' +self._node.target + "?>"
AttributeError: target
def createProcessingInstruction(self, target, data):
"Return a new ProcessingInstruction object."
d = _nodeData(PROCESSING_INSTRUCTION_NODE)
d.name = target
d.value = data
d.target = data # HAD TO ADD THIS LINE
return ProcessingInstruction(d, None, self)
Hoping-the-conference-ends-soon-so-the-cvs-tree-gets-updated-ly yours,
Jeff