org.sixdml.validation
Class orclXmlSchemaValidator

java.lang.Object
  |
  +--org.sixdml.validation.orclXmlSchemaValidator

public final class orclXmlSchemaValidator
extends Object

  
 orclXmlSchemaValidator.java

 This class uses the Oracle XDK Parser to validate XML schemas and instance documents. 

 Created: Sat Jan 12 19:51:19 2002

 

Version:
1.0
Author:
Dare Obasanjo

Constructor Summary
private orclXmlSchemaValidator()
          Default constructor private because no instances of this class will be needed.
 
Method Summary
static URL createURL(String fileName)
          Helper method to create a URL from a file name.
static void validate(URL instanceDocLocation)
          Validates an XML schema.
static void validate(URL schemaLocation, URL instanceDocLocation)
          Validates an XML schema against the provided instance document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

orclXmlSchemaValidator

private orclXmlSchemaValidator()
Default constructor private because no instances of this class will be needed.

Method Detail

validate

public static void validate(URL instanceDocLocation)
                     throws Exception
Validates an XML schema.

Parameters:
instanceDocLocation - the location of the instance document.
Exception

validate

public static void validate(URL schemaLocation,
                            URL instanceDocLocation)
                     throws Exception
Validates an XML schema against the provided instance document. If the schemaLocation variable is null then we assume we are validating an XSD file.

Parameters:
instanceDocLocation - the location of the instance document.
schemaLocation - the location of the schema.
Exception

createURL

public static URL createURL(String fileName)
                     throws MalformedURLException
Helper method to create a URL from a file name.
NOTE:The code below was obtained from the modifying example programs in the Oracle XDK. I wonder if this is a violation of their EULA's?

Parameters:
fileName - file to convert.
Returns:
the URL version of the filename.
MalformedURLException