public class XmlObjectSource extends java.lang.Object implements Source
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNSYNC_XML_OPTION |
DEFAULT_CHARACTER_SET_ENCODING
Constructor and Description |
---|
XmlObjectSource(XmlObject xml) |
XmlObjectSource(XmlObject xml, SchemaType type, java.lang.ClassLoader cl) |
Modifier and Type | Method and Description |
---|---|
static XmlOptions |
createXmlOptions(TransformOptions options)
Utility class that creates a set of
XmlOptions from a set of TransformOptions . |
java.lang.ClassLoader |
getClassLoader() |
java.io.InputStream |
getInputStream(TransformOptions options)
Returns streaming byte-baseed representation of the Source's content.
|
static XmlObjectSource |
getInstance(java.io.InputStream in, TransformOptions options)
Utility method that creates a new
XmlObjectSource from an InputStream containing marshalled XML. |
static XmlObjectSource |
getInstance(org.w3c.dom.Node node, TransformOptions options)
Utility method that creates a new
XmlObjectSource from a DOM node. |
static XmlObjectSource |
getInstance(java.lang.String xmlText, TransformOptions options)
Utility method that creates a new
XmlObjectSource from a piece of text containing stringified XML. |
SchemaType |
getSchemaType() |
XmlObject |
getXmlObject() |
java.lang.String |
toString() |
void |
writeTo(java.io.OutputStream os, TransformOptions options)
Serializes the Source's content to a byte-based stream.
|
public static final java.lang.String UNSYNC_XML_OPTION
public XmlObjectSource(XmlObject xml)
public XmlObjectSource(XmlObject xml, SchemaType type, java.lang.ClassLoader cl)
public XmlObject getXmlObject()
public java.lang.ClassLoader getClassLoader()
public SchemaType getSchemaType()
public java.io.InputStream getInputStream(TransformOptions options)
Source
getInputStream
in interface Source
options
- Options used to affect the serializationpublic void writeTo(java.io.OutputStream os, TransformOptions options) throws java.io.IOException
Source
Note that this method may involve an internal transformation, although it should not in any way change the underlying content.
public 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(java.lang.String xmlText, TransformOptions options) throws TransformException
XmlObjectSource
from a piece of text containing stringified XML.xmlText
-options
-TransformException
public static XmlObjectSource getInstance(org.w3c.dom.Node node, TransformOptions options) throws TransformException
XmlObjectSource
from a DOM node.node
-options
-TransformException
public static XmlObjectSource getInstance(java.io.InputStream in, TransformOptions options) throws TransformException
XmlObjectSource
from an InputStream
containing marshalled XML. This utility method will consume the provided InputStream.in
-options
-TransformException
public java.lang.String toString()
toString
in class java.lang.Object