Java Implementation

In validation we again encounter one of the areas where it takes us many more lines of code to do something with Java and JAXP than it does with C++ and MSXML. This is partially because the JAXP and Xerces implementations give us many more configuration options for our parser. The other reason is that the current versions of the JAXP and Xerces implementations don't give us a handy way to validate a DOM Document in memory before we write it disk. We have to do a bit of Java magic and create our own method.

Let's start with input validation because we have to build on these techniques when doing output validation.

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.