Next page Previous page Start of chapter End of chapter

JAXP tools

In this page we summarize the XML tools we have built in this section using JAXP. All tools but XMLTrans use the error handler ValidHandler; XMLTrans uses the error handler TransHandler:

SAXValid
A DTD validating parser based on SAX. Usage is:
java SAXValid document.xml
The DTD must be specificed in the XML document using a DTD declaration.
DOMValid
A DTD validating parser based on DOM. Usage is:
java DOMValid document.xml
The DTD must be specificed in the XML document using a DTD declaration.
XMLValid
A W3C Schema validating parser. Works with stream, SAX and DOM input sources. Usage is:
java XMLValid -s (stream|sax|dom) document.xml [schema.xsd]
The schema can be specificed either from command line or in the XML document using a xsi:schemaLocation attribute. Option -s specifies how the XML instance document should be read: as a stream of text (stream), as a stream of events (sax) or as a node tree (dom).
XMLTrans
An XSLT processor. Usage is:
java XMLTrans document.xml stylesheet.xsl
XPathEval
An XPath processor. Usage is:
java XPathEval query -r (nodeset|string|number|boolean) document.xml
where query is a string with the query and the -r option specifies the query result type. It returns the query result in XML format.
Next page Previous page Start of chapter End of chapter
Caffè XML - Massimo Franceschet