XML processing with Java API and JAXP librariesJAXP 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.
|
|
||
|
|||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.