Reputation: 3319
I find there are a lot of packages in jdk 6 are xml related. such as:
as a java newbie, I want to know, how these xml related api orgnized? what can they do in xml related programing? please also mention the third part library those can do samilary job.
I used to use dom4j to do xml to object transform, and now I find we can using jaxb, which is built in jdk.
Upvotes: 1
Views: 400
Reputation: 148977
There are several APIs in the JDK
Using these APIs together
These APIs can be used together in many different ways (below are examples from my blog):
javax.xml.validation
APIs to validate an object with JAXB annotations:
javax.xml.transform
APIs to transform an object with JAXB annotations:
XMLFilter
to a SAX parser to affect how JAXB objects are unmarshalled:
XMLStreamReader
to convert the middle of an XML document to objects.
Note:
The com.sun.org.apache
APIs are from the implementations of the standard XML APIs included in the JDK, I would recommend not using them directly. There are also alternate implementations of these standard APIs that can also be used that offer extensions beyond their corresponding specifications.
Upvotes: 4
Reputation: 689
Maybe you need JAXB: JAXB example. For me, Jaxb covers all needs in java.
Upvotes: 1