org.bibalex.daf.handlers.xmlhandler
Class SchemaValidator

java.lang.Object
  extended by org.bibalex.daf.handlers.xmlhandler.SchemaValidator

public class SchemaValidator
extends java.lang.Object

Validates an XML file against a given Schema.

Author:
fadi.edward

Nested Class Summary
private  class SchemaValidator.Validator
           
 
Constructor Summary
SchemaValidator()
           
 
Method Summary
 boolean validateSchema(java.lang.String SchemaUrl, org.xml.sax.InputSource XmlDocumentSource)
          Validates the given XML document against the given schema.
 boolean validateSchema(java.lang.String SchemaUrl, java.lang.String XmlDocumentUrl)
          Validates the given XML document against the given schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaValidator

public SchemaValidator()
Method Detail

validateSchema

public boolean validateSchema(java.lang.String SchemaUrl,
                              java.lang.String XmlDocumentUrl)
Validates the given XML document against the given schema.

Parameters:
SchemaUrl - The URL of the schema
XmlDocumentUrl - The URL of the XML document
Returns:
True if the XML document is valid with respect to the schema otherwise false.

validateSchema

public boolean validateSchema(java.lang.String SchemaUrl,
                              org.xml.sax.InputSource XmlDocumentSource)
Validates the given XML document against the given schema.

Parameters:
SchemaUrl - The URL of the schema
XmlDocumentSource - The InputSource representing the XML document.
Returns:
True if the XML document is valid with respect to the schema otherwise false.