Hi,
I need to check about the second endElement call, but your XML is
invalid as it has two root elements. Did you set up Xerces to proceed
also in case of fatal errors?
Alberto
Il 01/06/2012 12:48, SonalG ha scritto:
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?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]