[XML-SIG] losing cdata tag
Paul Tremblay
phthenry@earthlink.net
Wed, 29 May 2002 23:39:09 -0400
On Thu, May 30, 2002 at 12:44:35AM +0200, Martin v. Loewis wrote:
>
> There is not much point in guessing what software configuration might
> have gone wrong; instead, it is more productive finding out why your
> installation does not work correctly. As a starting point, locate the
> copy of expatreader.py that you are using, and edit the function
>
> def _reset_lex_handler_prop(self):
> self._parser.CommentHandler = self._lex_handler_prop.comment
> self._parser.StartCdataSectionHandler = self._lex_handler_prop.startCDATA
> self._parser.EndCdataSectionHandler = self._lex_handler_prop.endCDATA
>
> to read
>
> def _reset_lex_handler_prop(self):
> print "Resettint the lexical handler", self._lex_handler_prop.startCDATA
> self._parser.CommentHandler = self._lex_handler_prop.comment
> self._parser.StartCdataSectionHandler = self._lex_handler_prop.startCDATA
> self._parser.EndCdataSectionHandler = self._lex_handler_prop.endCDATA
I copied your code exactly as you said, and got no result.
I then inserted the following block of code:
def reset(self):
print "print ADDED: reset"
if self._namespaces:
self._parser = expat.ParserCreate(None, " ", intern = self._interning)
self._parser.StartElementHandler = self.start_element_ns
self._parser.EndElementHandler = self.end_element_ns
if self._lex_handler_prop:
print "print ADDED: reset_lex_handler_prop"
self._reset_lex_handler_prop()
I got this as a result:
print ADDED: reset
print ADDED: reset
<foo >
<some text>
</foo>
Thanks for your patience
Paul
--
************************
*Paul Tremblay *
*phthenry@earthlink.net*
************************