public class XMLBinding extends AbstractBinding
| Constructor and Description |
|---|
XMLBinding()
Public constructor.
|
XMLBinding(Smooks smooks)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
XMLBinding |
add(InputStream smooksConfigStream)
Add Smooks binding configurations to the binding instance.
|
XMLBinding |
add(String smooksConfigURI)
Add Smooks binding configurations to the binding instance.
|
<T> T |
fromXML(Source inputSource,
Class<T> toType)
Bind from the XML into the Java Object model.
|
<T> T |
fromXML(String inputSource,
Class<T> toType)
Bind from the XML into the Java Object model.
|
XMLBinding |
intiailize()
Initialize the binding instance.
|
XMLBinding |
setOmitXMLDeclaration(boolean omitXMLDeclaration)
Turn on/off outputting of the XML declaration when executing the
toXML(Object, java.io.Writer) method. |
XMLBinding |
setReportPath(String reportPath)
Set the execution report output path.
|
String |
toXML(Object object)
Write the supplied Object instance to XML.
|
<W extends Writer> |
toXML(Object object,
W outputWriter)
Write the supplied Object instance to XML.
|
assertInitialized, assertNotAllConfigsAdded, assertNotInitialized, bind, constructContextualGetter, constructContextualGetter, getSmooks, getUserDefinedResourceListpublic XMLBinding()
add(java.io.InputStream) (or add(String)) method
and then the intiailize() method.public XMLBinding(Smooks smooks)
smooks - The pre-configured Smooks instance.public XMLBinding add(String smooksConfigURI) throws IOException, SAXException
AbstractBindingadd in class AbstractBindingsmooksConfigURI - Smooks configuration.IOException - Error reading resource stream.SAXException - Error parsing the resource stream.public XMLBinding add(InputStream smooksConfigStream) throws IOException, SAXException
AbstractBindingadd in class AbstractBindingsmooksConfigStream - Smooks configuration.IOException - Error reading resource stream.SAXException - Error parsing the resource stream.public XMLBinding setReportPath(String reportPath)
AbstractBindingsetReportPath in class AbstractBindingreportPath - The execution report output path.public XMLBinding intiailize()
AbstractBindingintiailize in class AbstractBindingpublic XMLBinding setOmitXMLDeclaration(boolean omitXMLDeclaration)
toXML(Object, java.io.Writer) method.omitXMLDeclaration - True if the order is to be omitted, otherwise false.this instance.public <T> T fromXML(String inputSource, Class<T> toType)
T - The Java type to which the XML data is to be bound.inputSource - The XML input.toType - The Java type to which the XML data is to be bound.public <T> T fromXML(Source inputSource, Class<T> toType) throws IOException
T - The Java type to which the XML data is to be bound.inputSource - The XML input.toType - The Java type to which the XML data is to be bound.IOExceptionpublic <W extends Writer> W toXML(Object object, W outputWriter) throws BeanSerializationException, IOException
W - The Writer type.object - The Object instance.outputWriter - The output writer.Writer instance}.BeanSerializationException - Error serializing the bean.IOException - Error writing to the supplied Writer instance.public String toXML(Object object) throws BeanSerializationException
toXML(Object, java.io.Writer) method.object - The Object instance.BeanSerializationException - Error serializing the bean.Copyright © 2020. All rights reserved.