Hello,
We're using a SAX parser and currently have a class that extends org.xml.sax.helpers.DefaultHandler.
We've overrode startElement(), endElement(), and characters().
In our characters() method, the current code (a lot of it) considers the invocation of characters() to mean that all of the element's value (the "Hello" in <world>Hello</world) is complete and then goes thru a large if/else-if/else-if/... try/catch(es) statement. Then the endElement() is invoked and more if/else-if/... try/catch(es) statements are executed.
I've read that the semantics of characters() is that it is invoked multiple times if the element's value contains multiple lines and really characters() method should just "buffer" its value. And only once endElement() is called then and only then is the element's value is complete.
Because there is a lot of code, my question is if the default functionality can be overridden in the SAX parser so that characters() is called once irrelevant if the element's value contains multiple lines or not?
We're not running
Java (on Windows/Unix) with any special options other than "java -cp . MyParser my_data.xml"
Thanks,Jim
>