public class XMLWorker
extends java.lang.Object
| Constructor and Description |
|---|
XMLWorker() |
| Modifier and Type | Method and Description |
|---|---|
protected org.w3c.dom.Document |
create()
Create a new empty DOM document
|
boolean |
isValid(java.lang.String xmlFile,
java.lang.String xmlSchema)
Validate an XML file with an XML schema
|
protected org.w3c.dom.Document |
load(java.lang.String file)
Load the XML file into a DOM document
|
public boolean isValid(java.lang.String xmlFile,
java.lang.String xmlSchema)
xmlFile - location of the XML filexmlSchema - location of the XML schemaprotected org.w3c.dom.Document load(java.lang.String file)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
file - Path of the XML filejavax.xml.parsers.ParserConfigurationException - can't parseorg.xml.sax.SAXException - can't traversejava.io.IOException - can't openprotected org.w3c.dom.Document create()
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException - can't parse