public class XmlObjectSource extends Object implements Source
| Modifier and Type | Field and Description |
|---|---|
static String |
PRETTY_PRINT_OPTION |
static String |
TRACK_PAYLOAD_DETAILS |
static String |
UNSYNC_XML_OPTION |
DEFAULT_CHARACTER_SET_ENCODING| Constructor and Description |
|---|
XmlObjectSource(XmlObject xml) |
XmlObjectSource(XmlObject xml, SchemaType type, ClassLoader cl) |
XmlObjectSource(XmlObject xml, String contentType) |
| Modifier and Type | Method and Description |
|---|---|
static XmlOptions |
createXmlOptions(TransformOptions options)
Utility class that creates a set of
XmlOptions from a set of TransformOptions. |
ClassLoader |
getClassLoader() |
String |
getContentType() |
InputStream |
getInputStream(TransformOptions options)
Returns streaming byte-baseed representation of the Source's content.
|
static XmlObjectSource |
getInstance(InputStream in, TransformOptions options)
Utility method that creates a new
XmlObjectSource from an InputStream containing marshalled XML. |
static XmlObjectSource |
getInstance(Node node, TransformOptions options)
Utility method that creates a new
XmlObjectSource from a DOM node. |
static XmlObjectSource |
getInstance(String xmlText, TransformOptions options)
Utility method that creates a new
XmlObjectSource from a piece of text containing stringified XML. |
SchemaType |
getSchemaType() |
XmlObject |
getXmlObject() |
String |
toString() |
void |
writeTo(OutputStream os, TransformOptions options)
Serializes the Source's content to a byte-based stream.
|
public static final String UNSYNC_XML_OPTION
public static final String TRACK_PAYLOAD_DETAILS
public static final String PRETTY_PRINT_OPTION
public XmlObjectSource(XmlObject xml)
public XmlObjectSource(XmlObject xml,
String contentType)
public XmlObjectSource(XmlObject xml,
SchemaType type,
ClassLoader cl)
public XmlObject getXmlObject()
public String getContentType()
public ClassLoader getClassLoader()
public SchemaType getSchemaType()
public InputStream getInputStream(TransformOptions options)
SourcegetInputStream in interface Sourceoptions - Options used to affect the serializationpublic void writeTo(OutputStream os, TransformOptions options) throws IOException
SourceNote that this method may involve an internal transformation, although it should not in any way change the underlying content.
writeTo in interface Sourceos - the OutputStream to which serialized content will be writtenoptions - TransformOptions used to affect the serializationIOExceptionpublic static XmlOptions createXmlOptions(TransformOptions options)
XmlOptions from a set of TransformOptions. This method takes into account a base-set of default XmlOptions.options -public static XmlObjectSource getInstance(String xmlText, TransformOptions options) throws TransformException
XmlObjectSource from a piece of text containing stringified XML.xmlText -options -TransformExceptionpublic static XmlObjectSource getInstance(Node node, TransformOptions options) throws TransformException
XmlObjectSource from a DOM node.node -options -TransformExceptionpublic static XmlObjectSource getInstance(InputStream in, TransformOptions options) throws TransformException
XmlObjectSource from an InputStream containing marshalled XML. This utility method will consume the provided InputStream.in -options -TransformException