Hello.
I try to parse some XML results of PubMed (the largest biomedical
article database).
The document contains elements like this: <articletitle>[Virus and RNA
silencing]</articletitle>
Now my problem is that the characters function of my SAX handler is
called twice for "[Virus and RNA silencing]".
The first time I get "[Virus and RNA silencing" and the second time
"]".
I am not very experienced regarding XML and XML processing. Why does
this happen? Why not one call for "[Virus and RNA silencing]"? And is
there a way to set a property for SAX to behave that (only one call)
way?
Best regards,
Kai
Arne Vajhøj - 27 Mar 2008 21:36 GMT
> I try to parse some XML results of PubMed (the largest biomedical
> article database).
[quoted text clipped - 8 lines]
> there a way to set a property for SAX to behave that (only one call)
> way?
This is expected behavior of a SAX parser.
You characters method should accumulate content and
endElement do the final processing.
Arne