validating XML without throwing a Java exception
cliff palmer <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <CABhr9Ss6pTr1Hk4AvwCbvc-3=RuqDPLHRtUSRcPJxfG=Cr6UwA@mail.gmail.com> |
I need to examine several hundred thousand text strings and accumulate a count of the number of strings containing "well-formed XML" (i.e. can be parsed with saxBuilder and then used) vs "poorly-formed" (i.e. something in the string prevents successful parsing). My (limited) experience is that an exception (such as a JDOMException thrown by Saxbuilder.build()) will halt execution. How can I validate the XML in these strings without halting execution? Thanks! Cliff _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]