BeanIO 2.0.4

org.beanio.internal.config.xml
Class XmlMappingReader

java.lang.Object
  extended by org.beanio.internal.config.xml.XmlMappingReader

public class XmlMappingReader
extends Object

Reads 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
Author:
Kevin Seim

Constructor Summary
XmlMappingReader()
          Constructs a new XmlMappingReader.
 
Method Summary
protected  DocumentBuilderFactory createDocumentBuilderFactory()
          Creates an XML document builder factory.
protected  EntityResolver createEntityResolver()
          Returns the XML entity resolver for loading the BeanIO schema definition or other reference entities.
 Document loadDocument(InputStream in)
          Parses an XML BeanIO mapping file into a document object model (DOM).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMappingReader

public XmlMappingReader()
Constructs a new XmlMappingReader.

Method Detail

loadDocument

public Document loadDocument(InputStream in)
                      throws IOException,
                             BeanIOConfigurationException
Parses an XML BeanIO mapping file into a document object model (DOM).

Parameters:
in - the input stream to read
Returns:
the resulting DOM
Throws:
IOException - if an I/O error occurs
BeanIOConfigurationException - if the XML mapping file is malformed or invalid

createDocumentBuilderFactory

protected DocumentBuilderFactory createDocumentBuilderFactory()
Creates an XML document builder factory.

Returns:
the new DocumentBuilderFactory

createEntityResolver

protected EntityResolver createEntityResolver()
Returns the XML entity resolver for loading the BeanIO schema definition or other reference entities.

Returns:
XML entity resolver

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim