Module org.mule.runtime.dsl.api
Class MuleDocumentLoader
java.lang.Object
org.mule.runtime.dsl.internal.xml.parser.MuleDocumentLoader
Alternative to Spring's default document loader that uses SAX to add metadata to the DOM elements that are the
result of the default parser.
- Since:
- 3.8.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSAX filter that builds the metadata that will annotate the built nodes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DocumentBuildercreateDocumentBuilder(DocumentBuilderFactory factory, EntityResolver entityResolver, ErrorHandler errorHandler) protected DocumentBuilderFactorycreateDocumentBuilderFactory(int validationMode, boolean namespaceAware, org.mule.apache.xerces.xni.grammars.XMLGrammarPool grammarPool) protected XMLReadercreateSaxAnnotator(Supplier<SAXParserFactory> saxParserFactorySupplier, Document doc) loadDocument(Supplier<SAXParserFactory> saxParserFactorySupplier, InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware, org.mule.apache.xerces.xni.grammars.XMLGrammarPool xmlGrammarPool) Load theDocumentat the suppliedInputSourceusing the standard JAXP-configured XML parser.
-
Constructor Details
-
MuleDocumentLoader
public MuleDocumentLoader()
-
-
Method Details
-
loadDocument
public Document loadDocument(Supplier<SAXParserFactory> saxParserFactorySupplier, InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware, org.mule.apache.xerces.xni.grammars.XMLGrammarPool xmlGrammarPool) throws Exception Load theDocumentat the suppliedInputSourceusing the standard JAXP-configured XML parser.- Throws:
Exception
-
createSaxAnnotator
protected XMLReader createSaxAnnotator(Supplier<SAXParserFactory> saxParserFactorySupplier, Document doc) throws ParserConfigurationException, SAXException -
createDocumentBuilderFactory
protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware, org.mule.apache.xerces.xni.grammars.XMLGrammarPool grammarPool) throws ParserConfigurationException - Throws:
ParserConfigurationException
-
createDocumentBuilder
protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory, EntityResolver entityResolver, ErrorHandler errorHandler) throws ParserConfigurationException - Throws:
ParserConfigurationException
-