I've dealt with a few XML APIs in Java, but I don't have a good understanding of all the frameworks available in Java for dealing with XML for whatever purpose (e.g. JAXB, JAXP, Xerces, StAX, Castor, etc.). Can anyone highlight the most popular Java XML APIs and give a quick description of what they're intended to be used for? I'd also be interested in which APIs are used nowadays, and which might be considered deprecated.
Most of your questions are answered, I think, in earlier StackOverflow questions:
This sort of search is currenlty easier to do from Google
JAXP is a "pluggable API", a set of interfaces and abstract classes with a "reference implementation" by Sun, but it uses the factory approach to allow you to swap out to a different implementation (e.g. one that might be faster in certain types of uses) without having to change any of your code, just by changing a system property. It includes DOM, SAX, StAX, and XSLT. Sun has a good comparison page for DOM/SAX/StAX. I'd recommend the O'Reilly book on Java XML, you can find it used at a decent price but just make sure you have the latest (3rd) edition.
JAXB is a way of binding Java classes to XML files, using an XML schema. (You can autogenerate the java classes using a schema, or you can autogenerate the schema using java classes. I've used the former but not the latter.) It can be useful if your XML files have a well-known schema, and you want to treat the data in an XML file as if it were objects in a Java class. You do very little API calls at all, just one or two to marshal the data from Java to XML, or unmarshal the data from XML to Java. If your XML files are more freeform and/or you want to use XPATH to find things, you're probably better off using one of the JAXP API's.
Castor is an alternative to JAXB; I haven't used it but there's a comparison page on IBM's website.
Xerces is Apache's family of XML-handling packages. It includes one for Java, most of which can be used through JAXP as an alternate implementation for Sun's reference implementation. It also includes libraries for C++ and Perl.