public abstract class AbstractConfiguredDOMBuilder extends java.lang.Object implements ConfiguredDOMBuilder
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractConfiguredDOMBuilder.SaxErrorCollector
Simple implementation of SAX error handler when validating against schema.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractConfiguredDOMBuilder(boolean builderFactorySetValidate) |
Modifier and Type | Method and Description |
---|---|
protected javax.xml.parsers.DocumentBuilder |
getDOMBuilder() |
protected javax.xml.parsers.DocumentBuilderFactory |
getDOMBuilderFactory() |
protected org.xml.sax.ErrorHandler |
getErrorHandler() |
SaxErrorData |
getParsingErrors()
Returns errors collected during parsing; may be empty but never null.
|
protected javax.xml.validation.SchemaFactory |
getSchemaFactory()
This default implementation returns null; override to return configured schema factory.
|
org.w3c.dom.Document |
readAndValidate(java.io.File xmlFile)
Reads and validates
xmlFile and returns it as DOM document. |
org.w3c.dom.Document |
readAndValidate(org.xml.sax.InputSource source)
Reads and validates
source and returns it as DOM document. |
org.w3c.dom.Document |
readAndValidate(XmlString xmlText)
Reads and validates
xmlText and returns it as DOM document. |
protected AbstractConfiguredDOMBuilder(boolean builderFactorySetValidate)
protected final javax.xml.parsers.DocumentBuilderFactory getDOMBuilderFactory()
protected final javax.xml.parsers.DocumentBuilder getDOMBuilder() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
public final SaxErrorData getParsingErrors()
ConfiguredDOMBuilder
getParsingErrors
in interface ConfiguredDOMBuilder
public final org.w3c.dom.Document readAndValidate(java.io.File xmlFile)
ConfiguredDOMBuilder
xmlFile
and returns it as DOM document.readAndValidate
in interface ConfiguredDOMBuilder
public final org.w3c.dom.Document readAndValidate(XmlString xmlText)
ConfiguredDOMBuilder
xmlText
and returns it as DOM document.readAndValidate
in interface ConfiguredDOMBuilder
public final org.w3c.dom.Document readAndValidate(org.xml.sax.InputSource source)
ConfiguredDOMBuilder
source
and returns it as DOM document.readAndValidate
in interface ConfiguredDOMBuilder
protected final org.xml.sax.ErrorHandler getErrorHandler()
protected javax.xml.validation.SchemaFactory getSchemaFactory()
Copyright 2009-2016 Tatjana (Tanja) Kostic