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
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | AbstractReaderXSDFactory.SchemaFactoryProvider
Simple interface makes it easier to pass logic around in static methods. |
| Access | Constructor and Description |
|---|---|
| public | AbstractReaderXSDFactory(final SAXParserFactory
The SAXParserFactory used to create the XMLReader instances. fac, final AbstractReaderXSDFactory.The SchemaFactoryProvider instance that gives us Schema Factories sfp,The var-arg array of at least one SystemID reference (URL) to
locate the XSD's used to validate systemid)Create an XML Schema validating XMLReader factory using one or more XSD sources from SystemID references. |
| public | AbstractReaderXSDFactory(final SAXParserFactory
The SAXParserFactory used to create the XMLReader instances. fac, final AbstractReaderXSDFactory.The SchemaFactoryProvider instance that gives us Schema Factories sfp,The var-arg array of at least one SystemID reference (URL) to
locate the XSD's used to validate systemid)Create an XML Schema validating XMLReader factory using one or more XSD sources from URL references. |
| public | AbstractReaderXSDFactory(final SAXParserFactory
The SAXParserFactory used to create the XMLReader instances. fac, final AbstractReaderXSDFactory.The SchemaFactoryProvider instance that gives us Schema Factories sfp,The var-arg array of at least one SystemID reference (File) to
locate the XSD's used to validate systemid)Create an XML Schema validating XMLReader factory using one or more XSD sources from File references. |
| public | AbstractReaderXSDFactory(final SAXParserFactory
The SAXParserFactory used to create the XMLReader instances. fac, final AbstractReaderXSDFactory.The SchemaFactoryProvider instance that gives us Schema Factories sfp,The var-arg array of at least one transform Source reference to
locate the XSD's used to validate sources)Create an XML Schema validating XMLReader factory using one or more XSD sources from Transform Source references. |
| Modifier and Type | Method and Description |
|---|---|
| private static final Schema | Returns: the resulting SchemaThe source Files to compile systemID)Compile an array of Files in to URLs which are then compiled in to a single Schema |
| private static final Schema | Returns: the resulting SchemaThe sources to compile sources)Compile an array of Sources in to a single Schema |
| private static final Schema | Returns: the resulting SchemaThe source URLs to compile systemID)Compile an array of String URLs in to Sources which are then compiled in to a single Schema |
| private static final Schema | Returns: the resulting SchemaThe source URLs to compile systemID)Compile an array of URLs in to Sources which are then compiled in to a single Schema |
| AbstractReaderXSDFactory | back to summary |
|---|---|
| public AbstractReaderXSDFactory(final SAXParserFactory fac, final AbstractReaderXSDFactory. Create an XML Schema validating XMLReader factory using one or more XSD sources from SystemID references.
| |
| AbstractReaderXSDFactory | back to summary |
|---|---|
| public AbstractReaderXSDFactory(final SAXParserFactory fac, final AbstractReaderXSDFactory. Create an XML Schema validating XMLReader factory using one or more XSD sources from URL references.
| |
| AbstractReaderXSDFactory | back to summary |
|---|---|
| public AbstractReaderXSDFactory(final SAXParserFactory fac, final AbstractReaderXSDFactory. Create an XML Schema validating XMLReader factory using one or more XSD sources from File references.
| |
| AbstractReaderXSDFactory | back to summary |
|---|---|
| public AbstractReaderXSDFactory(final SAXParserFactory fac, final AbstractReaderXSDFactory. Create an XML Schema validating XMLReader factory using one or more XSD sources from Transform Source references.
| |
| getSchemaFromFile | back to summary |
|---|---|
| private static final Schema getSchemaFromFile(final AbstractReaderXSDFactory. Compile an array of Files in to URLs which are then compiled in to a single Schema
| |
| getSchemaFromSource | back to summary |
|---|---|
| private static final Schema getSchemaFromSource(final AbstractReaderXSDFactory. Compile an array of Sources in to a single Schema
| |
| getSchemaFromString | back to summary |
|---|---|
| private static final Schema getSchemaFromString(final AbstractReaderXSDFactory. Compile an array of String URLs in to Sources which are then compiled in to a single Schema
| |
| getSchemaFromURL | back to summary |
|---|---|
| private static final Schema getSchemaFromURL(final AbstractReaderXSDFactory. Compile an array of URLs in to Sources which are then compiled in to a single Schema
| |
| Modifier and Type | Method and Description |
|---|---|
| public SchemaFactory |
| getSchemaFactory | back to summary |
|---|---|
| public SchemaFactory getSchemaFactory() Return a SchemaFactory
| |