|
Processing
XML using Java
The Java
API for XML Processing is used for working with the XML files. If you
are writing an application that is going to handle the XML documents then
you might be using JAXP in your application.
_______________________________________________
For
working with JAXP you have to import the namespaces, javax.xml.parsers.DocumentBuilderFactory,
javax.xml.parsers.DocumentBuilder, and the org.w3c.dom.Document apart
from importing the usual java.io.File.
To work with
an XML document you need to create a Document object. This is done in
three steps by using the JAXP. The first step is to create a DocumentBuilderFactory
object and then use this object to create a DocumentBuilder object. The
DocumentBuilder object is then used to create the Document object. The
SAX API and the XSLT API are also used in the process of working with
the XML document using Java.
The SAX API
is used to create the parser objects that are used in parsing and the
XSLT APIs are used in the process of transforming the XML source document
to another form. The URL http://java.sun.com/
webservices/jaxp/dist/1.1/docs/tutorial/overview/3_apis.html
has lot of details regarding these APIs for working with Java and XML.
_______________________________________________
FREE
Subscription
Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.
Note
: We never rent, trade, or sell my email lists to
anyone.
We assure that your privacy is respected
and protected.
_______________________________________
Recommended
XML Books
|
|