public final class XMLValidator extends Object
Constructor and Description |
---|
XMLValidator() |
Modifier and Type | Method and Description |
---|---|
void |
checkSimpleXMLString(String xml)
Check some limits of our simplified XML output.
|
void |
validateStringWithXmlSchema(String xml,
String xmlSchemaPath,
String xmlPath)
Validate XML file using the given XSD.
|
void |
validateWithDtd(String filename,
String dtdPath,
String docType)
Validate XML file in classpath with the given DTD.
|
void |
validateWithXmlSchema(String filename,
String xmlSchemaPath)
Validate XML file using the given XSD.
|
void |
validateWithXmlSchema(String baseFilename,
String filename,
String xmlSchemaPath)
Validate XML file using the given XSD.
|
void |
validateXMLString(String xml,
String dtdFile,
String docType)
Validate XML with the given DTD.
|
public void checkSimpleXMLString(String xml) throws IOException
IOException
public void validateXMLString(String xml, String dtdFile, String docType) throws SAXException, IOException, ParserConfigurationException
public void validateWithDtd(String filename, String dtdPath, String docType) throws IOException
IOException
public void validateWithXmlSchema(String filename, String xmlSchemaPath) throws IOException
filename
- File in classpath to validatexmlSchemaPath
- XML schema file in classpathIOException
public void validateWithXmlSchema(String baseFilename, String filename, String xmlSchemaPath) throws IOException
baseFilename
- File to prepend common parts (unification) from before validating main filefilename
- File in classpath to validatexmlSchemaPath
- XML schema file in classpathIOException
public void validateStringWithXmlSchema(String xml, String xmlSchemaPath, String xmlPath) throws IOException
xml
- the XML string to be validatedxmlSchemaPath
- XML schema file in classpathIOException