Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javax.xml.parsers.DocumentBuilder to skip invalid XML characters?

807605Aug 21 2007 — edited Aug 21 2007
Hi,

I convert XML files into flat files. In doing so I call the API DocumentBuilder.parse(File f). If the XML file f contains an invalid XML character, the API throws a SAXException.

My question is: while I know that certain invalid XML chars are not part of the data and therefore can be safely ignored in the conversion, is there a way to tell the API to skip those chars?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2007
Added on Aug 21 2007
3 comments
835 views