Oct 23

By default a StAX parser will break (typically latge) CHARACTER event into pieces to avoid creating large strings. You have no control over where this break occurs.

You can use a factory property “javax.xml.stream.isCoalescing” to control this behaviour and force it to combine adjacent CHARACTER events into a single event.

   XMLInputFactory.IS_COALESCING, Boolean.TRUE);

written by objects \\ tags: , , , ,

Mar 25

When an XML parser encounters an error while parsing it generally just gives up. Sometimes this is not what we want and would instead would like it to soldier on.

In these case Xerces has a useful feature that allows you to instruct it to continue parsing


Once that is set the parser will happily continue parsing even after it has encountered an error.

written by objects \\ tags: , ,