Hi alek, I had looked at this doc but it didn't seem clear to me as all it indicates is that the character will be... "all of an element's content (character data, processing instructions, and/or subelements) will appear, in order, between the startElement event and the corresponding endElement event." that isn't clear if multiple events fire or not.
I figured I hit a buffer issue and it was just clearing out the buffer. It just seemed to me that you would clear the buffer for character data between the end of an element and the beginning of the next. I was concerned I couldn't discern any pattern to the buffer clearing. i.e. every X records I see this happen. It was fairly random. Thanks for replying as I wanted to check and see if I was seeing "normal" behaviour or not that helps alot. later. thx Carl -----Original Message----- From: Aleksander Slominski [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 7:27 PM To: [EMAIL PROTECTED] Subject: Re: SAXParser question Carl Christianson wrote: > Hi all, > this might be a dumb question but I'm wondering if something I'm seeing is > "normal". it is normal as specified in http://sax.sourceforge.net/apidoc/org/xml/sax/ContentHandler.html#characters (char[], int, int) i think that the reason for this behavior is that parser is firing characters() with partial input event when during reading input buffer is re-filled so current content is returned in characters() event. you are supposed to buffer characters until endTag and only then you know all character content of element (for example by using StringBuffer) - you should do it unless SAX2 driver you are using will do this buffering for you but this will make your SAX2 code dependent on this particular SAX2 implementation and this is not good for code prtability... alek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
