public class XMLReaderXSDFactory extends AbstractReaderXSDFactory
This class has var-arg constructors, accepting potentially many XSD sources. It is just as simple though to have a single source:
File xsdfile = new File("schema.xsd"); XMLReaderJDOMFactory schemafac = new XMLReaderXSDFactory(xsdfile); SAXBuilder builder = new SAXBuilder(schemafac); File xmlfile = new File("data.xml"); Document validdoc = builder.build(xmlfile);
org.jdom2.input.sax
AbstractReaderXSDFactory.SchemaFactoryProvider
Constructor and Description |
---|
XMLReaderXSDFactory(java.io.File... systemid)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from File references.
|
XMLReaderXSDFactory(javax.xml.transform.Source... sources)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from Transform Source references.
|
XMLReaderXSDFactory(java.lang.String... systemid)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from SystemID references.
|
XMLReaderXSDFactory(java.lang.String factoryClassName,
java.lang.ClassLoader classloader,
java.io.File... systemid)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from File references, and use the specified JAXP SAXParserFactory.
|
XMLReaderXSDFactory(java.lang.String factoryClassName,
java.lang.ClassLoader classloader,
javax.xml.transform.Source... sources)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from Transform Source references, and use the specified JAXP SAXParserFactory.
|
XMLReaderXSDFactory(java.lang.String factoryClassName,
java.lang.ClassLoader classloader,
java.lang.String... systemid)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from SystemID references, and use the specified JAXP SAXParserFactory.
|
XMLReaderXSDFactory(java.lang.String factoryClassName,
java.lang.ClassLoader classloader,
java.net.URL... systemid)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from URL references, and use the specified JAXP SAXParserFactory.
|
XMLReaderXSDFactory(java.net.URL... systemid)
Create an XML Schema validating XMLReader factory using one or more XSD
sources from URL references.
|
createXMLReader, isValidating
public XMLReaderXSDFactory(java.lang.String... systemid) throws JDOMException
systemid
- The var-arg array of at least one SystemID reference (URL) to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the SystemIDs This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(java.lang.String factoryClassName, java.lang.ClassLoader classloader, java.lang.String... systemid) throws JDOMException
factoryClassName
- The name of the SAXParserFactory class to useclassloader
- The classLoader to use for loading the SAXParserFactory.systemid
- The var-arg array of at least one SystemID reference (URL) to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the SystemIDs This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(java.net.URL... systemid) throws JDOMException
systemid
- The var-arg array of at least one SystemID reference (URL) to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the SystemIDs This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(java.lang.String factoryClassName, java.lang.ClassLoader classloader, java.net.URL... systemid) throws JDOMException
factoryClassName
- The name of the SAXParserFactory class to useclassloader
- The classLoader to use for loading the SAXParserFactory.systemid
- The var-arg array of at least one SystemID reference (URL) to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the SystemIDs This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(java.io.File... systemid) throws JDOMException
systemid
- The var-arg array of at least one SystemID reference (File) to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the SystemIDs This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(java.lang.String factoryClassName, java.lang.ClassLoader classloader, java.io.File... systemid) throws JDOMException
factoryClassName
- The name of the SAXParserFactory class to useclassloader
- The classLoader to use for loading the SAXParserFactory.systemid
- The var-arg array of at least one SystemID reference (File) to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the SystemIDs This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(javax.xml.transform.Source... sources) throws JDOMException
sources
- The var-arg array of at least one transform Source reference to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the Sources This will
wrap a SAXException that contains the actual fault.public XMLReaderXSDFactory(java.lang.String factoryClassName, java.lang.ClassLoader classloader, javax.xml.transform.Source... sources) throws JDOMException
factoryClassName
- The name of the SAXParserFactory class to useclassloader
- The classLoader to use for loading the SAXParserFactory.sources
- The var-arg array of at least one transform Source reference to
locate the XSD's used to validateJDOMException
- If the Schemas could not be loaded from the Sources This will
wrap a SAXException that contains the actual fault.Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.