org.apache.xml.serializer.ToStream
or
one of its derived classes depending on the serialization method, while walking
the DOM in DOM3TreeWalker.
Modifier and Type | Field and Description |
---|---|
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private Properties | |
private DOMErrorHandler | |
private DOM3Serializer | |
private String | |
private String | |
protected int | |
private JdkProperty | |
private String[] | |
private LSSerializerFilter | |
private Node | |
private Serializer | fXMLSerializer
private data members |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final int |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public boolean | canSetParameter(String
A String containing the DOMConfiguration parameter name. name, Object An Object specifying the value of the corresponding parameter. value)Implements org. Checks if setting a parameter to a specific value is supported. |
public DOMConfiguration | Returns: A DOMConfiguration object.Implements org. Returns the DOMConfiguration of the LSSerializer. |
public DOMErrorHandler | Returns: Returns the fDOMErrorHandler.This method returns the LSSerializer's error handler. |
public LSSerializerFilter | Returns: A LSSerializerFilter object.Implements org. Returns the DOMConfiguration of the LSSerializer. |
protected String | Returns: A String containing the input encoding.The Node to serialize nodeArg)Determines the Input Encoding of the Document Node to serialize. |
public String | Returns: A String containing the end-of-line character sequence used in serialization.Implements org. Returns the End-Of-Line sequence of characters to be used in the XML being serialized. |
public Object | Returns: Object The value of the parameter if known.A String containing the DOMConfiguration parameter name
whose value is to be returned. name)Implements org. This method returns the value of a parameter if known. |
public DOMStringList | Returns: DOMStringList A list of DOMConfiguration parameters recognized by the serializerImplements org. This method returns a of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application |
protected String | Returns: A String containing the encoding pseudo-attribute of the XMLDecl.The Node to serialize nodeArg)Determines the XML Encoding of the Document Node to serialize. |
protected String | Returns: A String containing the version pseudo-attribute of the XMLDecl.The Node to serialize nodeArg)Determines the XML Version of the Document Node to serialize. |
public void | initializeSerializerProps()
Initializes the underlying serializer's configuration depending on the default DOMConfiguration parameters. |
public void | setFilter(LSSerializerFilter
A LSSerializerFilter to be applied to the stream to serialize. filter)Implements org. Set a LSSerilizerFilter on the LSSerializer. |
public void | setNewLine(String
a String that is the end-of-line character sequence to be used in
serialization. newLine)Implements org. Sets the End-Of-Line sequence of characters to be used in the XML being serialized. |
public void | setParameter(String
A String containing the DOMConfiguration parameter name. name, Object An Object contaiing the parameters value to set. value)Implements org. This method sets the value of the named parameter. |
public boolean | write(Node
The Node to serialize. nodeArg, LSOutput The destination for the serialized DOM. destination)Implements org. Serializes the specified node to the specified LSOutput and returns true if the Node was successfully serialized. |
public String | writeToString(Node
The Node to serialize. nodeArg)Implements org. Serializes the specified node and returns a String with the serialized data to the caller. |
public boolean | writeToURI(Node
The Node to serialize. nodeArg, String The URI to write to. uri)Implements org. Serializes the specified node to the specified URI and returns true if the Node was successfully serialized. |
CANONICAL | back to summary |
---|---|
private static final int CANONICAL |
CDATA | back to summary |
---|---|
private static final int CDATA |
CHARNORMALIZE | back to summary |
---|---|
private static final int CHARNORMALIZE |
COMMENTS | back to summary |
---|---|
private static final int COMMENTS |
DISCARDDEFAULT | back to summary |
---|---|
private static final int DISCARDDEFAULT |
DTNORMALIZE | back to summary |
---|---|
private static final int DTNORMALIZE |
ELEM_CONTENT_WHITESPACE | back to summary |
---|---|
private static final int ELEM_CONTENT_WHITESPACE |
ENTITIES | back to summary |
---|---|
private static final int ENTITIES |
fDOMConfigProperties | back to summary |
---|---|
private Properties fDOMConfigProperties |
fDOMErrorHandler | back to summary |
---|---|
private DOMErrorHandler fDOMErrorHandler |
fDOMSerializer | back to summary |
---|---|
private DOM3Serializer fDOMSerializer |
fEncoding | back to summary |
---|---|
private String fEncoding |
fEndOfLine | back to summary |
---|---|
private String fEndOfLine |
fFeatures | back to summary |
---|---|
protected int fFeatures |
fIsStandalone | back to summary |
---|---|
private JdkProperty<Boolean> fIsStandalone |
fRecognizedParameters | back to summary |
---|---|
private String[] fRecognizedParameters
|
fSerializerFilter | back to summary |
---|---|
private LSSerializerFilter fSerializerFilter |
fVisitedNode | back to summary |
---|---|
private Node fVisitedNode |
fXMLSerializer | back to summary |
---|---|
private Serializer fXMLSerializer private data members |
IGNORE_CHAR_DENORMALIZE | back to summary |
---|---|
private static final int IGNORE_CHAR_DENORMALIZE |
INFOSET | back to summary |
---|---|
private static final int INFOSET |
IS_STANDALONE | back to summary |
---|---|
private static final int IS_STANDALONE |
NAMESPACEDECLS | back to summary |
---|---|
private static final int NAMESPACEDECLS |
NAMESPACES | back to summary |
---|---|
private static final int NAMESPACES |
NORMALIZECHARS | back to summary |
---|---|
private static final int NORMALIZECHARS |
PRETTY_PRINT | back to summary |
---|---|
private static final int PRETTY_PRINT |
SCHEMAVALIDATE | back to summary |
---|---|
private static final int SCHEMAVALIDATE |
SPLITCDATA | back to summary |
---|---|
private static final int SPLITCDATA |
VALIDATE | back to summary |
---|---|
private static final int VALIDATE |
WELLFORMED | back to summary |
---|---|
private static final int WELLFORMED |
XMLDECL | back to summary |
---|---|
private static final int XMLDECL |
LSSerializerImpl | back to summary |
---|---|
public LSSerializerImpl() Constructor: Creates a LSSerializerImpl object. The underlying XML 1.0 or XML 1.1 org.apache.xml.serializer.Serializer object is created and initialized the first time any of the write methods are invoked to serialize the Node. Subsequent write methods on the same LSSerializerImpl object will use the previously created Serializer object. |
canSetParameter | back to summary |
---|---|
public boolean canSetParameter(String name, Object value) Implements org. Checks if setting a parameter to a specific value is supported.
|
getDomConfig | back to summary |
---|---|
public DOMConfiguration getDomConfig() Implements org. Returns the DOMConfiguration of the LSSerializer.
|
getErrorHandler | back to summary |
---|---|
public DOMErrorHandler getErrorHandler() This method returns the LSSerializer's error handler.
|
getFilter | back to summary |
---|---|
public LSSerializerFilter getFilter() Implements org. Returns the DOMConfiguration of the LSSerializer.
|
getInputEncoding | back to summary |
---|---|
protected String getInputEncoding(Node nodeArg) Determines the Input Encoding of the Document Node to serialize. If the Document Node is not a DOM Level 3 Node, then null is returned. |
getNewLine | back to summary |
---|---|
public String getNewLine() Implements org. Returns the End-Of-Line sequence of characters to be used in the XML being serialized. If none is set a default "\n" is returned.
|
getParameter | back to summary |
---|---|
public Object getParameter(String name) throws DOMException Implements org. This method returns the value of a parameter if known.
|
getParameterNames | back to summary |
---|---|
public DOMStringList getParameterNames() Implements org. This method returns a of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application
|
getXMLEncoding | back to summary |
---|---|
protected String getXMLEncoding(Node nodeArg) Determines the XML Encoding of the Document Node to serialize. If the Document Node is not a DOM Level 3 Node, then the default encoding "UTF-8" is returned. |
getXMLVersion | back to summary |
---|---|
protected String getXMLVersion(Node nodeArg) Determines the XML Version of the Document Node to serialize. If the Document Node is not a DOM Level 3 Node, then the default version returned is 1.0. |
initializeSerializerProps | back to summary |
---|---|
public void initializeSerializerProps() Initializes the underlying serializer's configuration depending on the default DOMConfiguration parameters. This method must be called before a node is to be serialized. |
setFilter | back to summary |
---|---|
public void setFilter(LSSerializerFilter filter) Implements org. Set a LSSerilizerFilter on the LSSerializer. When set, the filter is called before each node is serialized which depending on its implemention determines if the node is to be serialized or not.
|
setNewLine | back to summary |
---|---|
public void setNewLine(String newLine) Implements org. Sets the End-Of-Line sequence of characters to be used in the XML being serialized. Setting this attribute to null will reset its value to the default value i.e. "\n".
|
setParameter | back to summary |
---|---|
public void setParameter(String name, Object value) throws DOMException Implements org. This method sets the value of the named parameter.
|
write | back to summary |
---|---|
public boolean write(Node nodeArg, LSOutput destination) throws LSException Implements org. Serializes the specified node to the specified LSOutput and returns true if the Node was successfully serialized.
|
writeToString | back to summary |
---|---|
public String writeToString(Node nodeArg) throws DOMException, LSException Implements org. Serializes the specified node and returns a String with the serialized data to the caller.
|
writeToURI | back to summary |
---|---|
public boolean writeToURI(Node nodeArg, String uri) throws LSException Implements org. Serializes the specified node to the specified URI and returns true if the Node was successfully serialized.
|