JDOM
2.0.5

org.jdom2.input.sax
Class XMLReaderSchemaFactory

java.lang.Object
  extended by org.jdom2.input.sax.AbstractReaderSchemaFactory
      extended by org.jdom2.input.sax.XMLReaderSchemaFactory
All Implemented Interfaces:
XMLReaderJDOMFactory

public class XMLReaderSchemaFactory
extends AbstractReaderSchemaFactory

This XMLReaderJDOMFactory class returns XMLReaders configured to validate against the supplied Schema instance. The Schema could be an XSD schema or some other schema supported by SAX (e.g. RelaxNG). The SAX Parser is obtained through the JAXP process.

If you want to validate an XML document against the XSD references embedded in the XML itself (xsdSchemaLocation) then you do not want to use this class but rather use an alternate means like XMLReaders.XSDVALIDATING.

See the package documentation for the best alternatives.

Author:
Rolf Lear
See Also:
org.jdom2.input.sax

Constructor Summary
XMLReaderSchemaFactory(javax.xml.validation.Schema schema)
          XMLReader instances from this class will be configured to validate using the supplied Schema instance.
XMLReaderSchemaFactory(java.lang.String factoryClassName, java.lang.ClassLoader classloader, javax.xml.validation.Schema schema)
          XMLReader instances from this class will be configured to validate using the supplied Schema instance, and use the specified JAXP SAXParserFactory.
 
Method Summary
 
Methods inherited from class org.jdom2.input.sax.AbstractReaderSchemaFactory
createXMLReader, isValidating
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLReaderSchemaFactory

public XMLReaderSchemaFactory(javax.xml.validation.Schema schema)
XMLReader instances from this class will be configured to validate using the supplied Schema instance.

Parameters:
schema - The Schema to use for validation.

XMLReaderSchemaFactory

public XMLReaderSchemaFactory(java.lang.String factoryClassName,
                              java.lang.ClassLoader classloader,
                              javax.xml.validation.Schema schema)
XMLReader instances from this class will be configured to validate using the supplied Schema instance, and use the specified JAXP SAXParserFactory.

Parameters:
factoryClassName - The name of the SAXParserFactory class to use
classloader - The classLoader to use for loading the SAXParserFactory.
schema - The Schema to use for validation.
Since:
2.0.3

JDOM
2.0.5

Copyright � 2013 Jason Hunter, Brett McLaughlin. All Rights Reserved.