Class FlatXmlUnmarshaller
- java.lang.Object
-
- net.officefloor.plugin.xml.unmarshall.flat.FlatXmlUnmarshaller
-
- All Implemented Interfaces:
XmlUnmarshaller
public class FlatXmlUnmarshaller extends java.lang.Object implements XmlUnmarshaller
XML unmarshaller to load a flat object.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
FlatXmlUnmarshaller.HandlerImpl
Handler to load XML values onto target object.
-
Field Summary
Fields Modifier and Type Field Description protected FlatXmlUnmarshaller.HandlerImpl
handler
Handler to load the XML to the target object.protected javax.xml.parsers.SAXParser
parser
Parses the XML.
-
Constructor Summary
Constructors Constructor Description FlatXmlUnmarshaller(FlatXmlUnmarshallerMetaData metaData)
Initiate with meta-data to unmarshall the XML.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
unmarshall(java.io.InputStream xml, java.lang.Object target)
Unmarshalls the input xml onto the input target object.
-
-
-
Field Detail
-
parser
protected final javax.xml.parsers.SAXParser parser
Parses the XML.
-
handler
protected final FlatXmlUnmarshaller.HandlerImpl handler
Handler to load the XML to the target object.
-
-
Constructor Detail
-
FlatXmlUnmarshaller
public FlatXmlUnmarshaller(FlatXmlUnmarshallerMetaData metaData) throws XmlMarshallException
Initiate with meta-data to unmarshall the XML.- Parameters:
metaData
- Meta-data to unmarshall XML.- Throws:
XmlMarshallException
- Should fail to initiate instance.
-
-
Method Detail
-
unmarshall
public void unmarshall(java.io.InputStream xml, java.lang.Object target) throws XmlMarshallException
Description copied from interface:XmlUnmarshaller
Unmarshalls the input xml onto the input target object.- Specified by:
unmarshall
in interfaceXmlUnmarshaller
- Parameters:
xml
- XML to unmarshall.target
- Target object to load XML data onto.- Throws:
XmlMarshallException
- Should fail to load XML data onto the target object.
-
-