Package org.beanio.internal.config.xml
Class XmlMappingReader
- java.lang.Object
-
- org.beanio.internal.config.xml.XmlMappingReader
-
public class XmlMappingReader extends java.lang.ObjectReads a BeanIO XML mapping file into an XML document object model (DOM) and validates the XML using the BeanIO mapping schema.This class can safely parse multiple input streams concurrently.
- Since:
- 1.2.1
-
-
Constructor Summary
Constructors Constructor Description XmlMappingReader()Constructs a newXmlMappingReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.xml.parsers.DocumentBuilderFactorycreateDocumentBuilderFactory()Creates an XML document builder factory.protected org.xml.sax.EntityResolvercreateEntityResolver()Returns the XML entity resolver for loading the BeanIO schema definition or other reference entities.org.w3c.dom.DocumentloadDocument(java.io.InputStream in)Parses an XML BeanIO mapping file into a document object model (DOM).
-
-
-
Method Detail
-
loadDocument
public org.w3c.dom.Document loadDocument(java.io.InputStream in) throws java.io.IOException, BeanIOConfigurationExceptionParses an XML BeanIO mapping file into a document object model (DOM).- Parameters:
in- the input stream to read- Returns:
- the resulting DOM
- Throws:
java.io.IOException- if an I/O error occursBeanIOConfigurationException- if the XML mapping file is malformed or invalid
-
createDocumentBuilderFactory
protected javax.xml.parsers.DocumentBuilderFactory createDocumentBuilderFactory()
Creates an XML document builder factory.- Returns:
- the new
DocumentBuilderFactory
-
createEntityResolver
protected org.xml.sax.EntityResolver createEntityResolver()
Returns the XML entity resolver for loading the BeanIO schema definition or other reference entities.- Returns:
- XML entity resolver
-
-