XML
processing with Java API and JAXP libraries
JAXP
stands for Java API for XML Processing. It consists of a set of classes
that includes methods and properties that can be used against an XML document.
You can download this API from the Sun Microsystems website.
_______________________________________________
With
the appropriate packages imported in your java program you can validate
the XML document against a particular schema. A validator class is available
for this purpose.
A schema
class is available that can load the XSL file to be used for validation.
The validate() method of the validator class uses the source document
to be validated against the schema and gives you the result.
DocumentBuilderFactory,
DocumentBuilder and Document objects are available for creating the document
object and load the XML document that is to be manipulated.
NodeList
object can be used to load all the nodes available in the XML document
that is got by using methods like getElementByTagName(). Once you load
all the elements in the NodeList, you can use a 'for' loop in your program
to loop through them and work on each element or display them.
_______________________________________________
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
|
|