JAXP
With SAX and DOM, there aren't a whole lot of XML problems you run into that you can't solve. Loading, reading, and writing XML are all handled by these APIs, and you can even avoid vendor-specific code with the tricks you've already seen in previous chapters. However, Java remains a Sun creation (as much as I'd love to see the language go open source), and as a rule, Sun is going to provide an API for anything it sees as commonthe thinking, I suppose, is that if a programmer is going to work with Java, he should be using Sun software as much as possible. Along those lines, Sun provides JAXP for working with XML. Although initially a very small API that handled only parsing, the latest version of JAXP provides everything you find in SAX and DOM, as well as a few extras, and JAXP makes vendor neutrality much easier than using DOM or SAX directly. In this chapter, I'll walk you through JAXP piece by piece, from parsing to validation to transformations.