Hello,
I have overridden SAX parser methods startElement, endElement and
characters.
In characters method i am concatenating values since it may be called
multiple times.
My sample XML looks like following:
<?xml version="1.0" encoding="UTF-8"?>
<CDR>
<CALL_TYPE>MOC</CALL_TYPE>
<A_PTY>1</A_PTY>
<B_PTY>2</B_PTY>
</CDR>
<CDR>
<CALL_TYPE>MTC</CALL_TYPE>
<A_PTY>2</A_PTY>
<B_PTY>1</B_PTY>
</CDR>
I am treating the fields enclosed within <CDR></CDR> to be one record.
The problem I am facing is when the endElement is called for the first
</CDR>, it also immediately calls endElement again with junk characters
(there is no StartElement called).
And then it gives segmentation fault.
What I expect is it to call start element for the next <CDR>.
What could be the problem with the parser or handling of startElement and
endElement methods?
--
View this message in context:
http://old.nabble.com/endElement-called-with-junk-characters-tp33944001p33944001.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]