com.skaringa.util
Class SAXValidator

java.lang.Object
  extended by com.skaringa.util.SAXValidator

public final class SAXValidator
extends java.lang.Object

Check if an XML file is valid


Method Summary
static void validate(org.xml.sax.InputSource xmlSource, org.xml.sax.InputSource schemaSource)
          Validate a XML instance against a schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static void validate(org.xml.sax.InputSource xmlSource,
                            org.xml.sax.InputSource schemaSource)
                     throws org.xml.sax.SAXException,
                            java.io.IOException,
                            javax.xml.parsers.ParserConfigurationException
Validate a XML instance against a schema.

Parameters:
xmlSource - The source of the instance.
schemaSource - The source of the schema.
Throws:
org.xml.sax.SAXException - If the instance doesn't validate.
java.io.IOException - If reading the instance or schema failes.
javax.xml.parsers.ParserConfigurationException - If the parser isn't validating.