Deprecated
Replaced by org.apache.xml.serializer.dom3.LSSerializerImpl in Xerces 2.9.0.
XMLSerializer.
LSSerializer provides an API for serializing (writing) a DOM document out in an
XML document. The XML data is written to an output stream.
During serialization of XML data, namespace fixup is done when possible as
defined in DOM Level 3 Core, Appendix B.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | DOMSerializerImpl.DocumentMethods
Holder of DOM Level 3 methods from org.w3c.dom.Document. |
| Modifier and Type | Field and Description |
|---|---|
| protected static final short | |
| protected static final short | |
| protected static final short | |
| protected static final short | |
| protected static final short | |
| protected short | features
REVISIT: Currently we handle 3 different configurations, would be nice just have one configuration that has different recognized parameters depending if it is used in Core/LS. |
| private final DOMErrorImpl | |
| private DOMErrorHandler | |
| private final DOMLocatorImpl | |
| private DOMStringList | |
| protected static final short | |
| protected static final short | |
| protected static final short | |
| protected static final short | |
| private XMLSerializer | serializer
Deprecated
as a consequence of
XMLSerializer being deprecated.
|
| protected static final short | |
| protected static final short | |
| private XML11Serializer | xml11Serializer
Deprecated
as a consequence of
XML11Serializer being deprecated.
|
| protected static final short |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private String | |
| private String | |
| public boolean | canSetParameter(String
The name of the parameter to check. name, Object An object. if state)null, the returned value is
true.Implements org. |
| private void | copySettings(XMLSerializer src, XMLSerializer dest)
Deprecated
as a consequence of
XMLSerializer being deprecated.
|
| public DOMConfiguration | getDomConfig()
Implements org. DOMConfiguration object used by the
LSSerializer when serializing a DOM node.
|
| public LSSerializerFilter | getFilter()
Implements org. |
| public String | getNewLine()
Implements org. |
| public Object | getParameter(String
The name of the parameter. name)Implements org. |
| public DOMStringList | getParameterNames()
Implements org. |
| private void | |
| private void | prepareForSerialization(XMLSerializer ser, Node node)
Deprecated
as a consequence of
XMLSerializer being deprecated.
|
| public void | setFilter(LSSerializerFilter filter)
Implements org. |
| public void | setNewLine(String newLine)
Implements org. |
| public void | setParameter(String
The name of the parameter to set. name, Object The new value or value)null if the user wishes to
unset the parameter. While the type of the value parameter is
defined as DOMUserData, the object type must match the
type defined by the definition of the parameter. For example, if
the parameter is "error-handler", the value must be of type
DOMErrorHandler.Implements org. |
| private void | |
| public boolean | Returns: Returnstrue if node was
successfully serialized and false in case the node
couldn't be serialized.The node to serialize. node, LSOutput The destination for the serialized DOM. destination)Implements org. LSSerializer interface.
|
| public String | Returns: Returns the serialized dataThe node to be written. wnode)Implements org. LSSerializer.
|
| public boolean | Returns: Returnstrue if node was
successfully serialized and false in case the node
couldn't be serialized.The node to serialize. node, String The URI to write to. URI)Implements org. LSSerializer interface.
|
| CDATA | back to summary |
|---|---|
| protected static final short CDATA | |
| COMMENTS | back to summary |
|---|---|
| protected static final short COMMENTS | |
| DISCARDDEFAULT | back to summary |
|---|---|
| protected static final short DISCARDDEFAULT | |
| DOM_ELEMENT_CONTENT_WHITESPACE | back to summary |
|---|---|
| protected static final short DOM_ELEMENT_CONTENT_WHITESPACE | |
| ENTITIES | back to summary |
|---|---|
| protected static final short ENTITIES | |
| features | back to summary |
|---|---|
| protected short features REVISIT: Currently we handle 3 different configurations, would be nice just have one configuration that has different recognized parameters depending if it is used in Core/LS. | |
| fError | back to summary |
|---|---|
| private final DOMErrorImpl fError | |
| fErrorHandler | back to summary |
|---|---|
| private DOMErrorHandler fErrorHandler | |
| fLocator | back to summary |
|---|---|
| private final DOMLocatorImpl fLocator | |
| fRecognizedParameters | back to summary |
|---|---|
| private DOMStringList fRecognizedParameters | |
| INFOSET | back to summary |
|---|---|
| protected static final short INFOSET | |
| NAMESPACES | back to summary |
|---|---|
| protected static final short NAMESPACES | |
| NSDECL | back to summary |
|---|---|
| protected static final short NSDECL | |
| PRETTY_PRINT | back to summary |
|---|---|
| protected static final short PRETTY_PRINT | |
| serializer | back to summary |
|---|---|
| private XMLSerializer serializer
Deprecated as a consequence of | |
| SPLITCDATA | back to summary |
|---|---|
| protected static final short SPLITCDATA | |
| WELLFORMED | back to summary |
|---|---|
| protected static final short WELLFORMED | |
| xml11Serializer | back to summary |
|---|---|
| private XML11Serializer xml11Serializer
Deprecated as a consequence of | |
| XMLDECL | back to summary |
|---|---|
| protected static final short XMLDECL | |
| DOMSerializerImpl | back to summary |
|---|---|
| public DOMSerializerImpl() Constructs a new LSSerializer.
The constructor turns on the namespace support in | |
| _getInputEncoding | back to summary |
|---|---|
| private String _getInputEncoding(Node node) | |
| _getXmlEncoding | back to summary |
|---|---|
| private String _getXmlEncoding(Node node) | |
| _getXmlVersion | back to summary |
|---|---|
| private String _getXmlVersion(Node node) | |
| canSetParameter | back to summary |
|---|---|
| public boolean canSetParameter(String name, Object state) Implements org. DOM L3-EXPERIMENTAL: Check if parameter can be set
| |
| copySettings | back to summary |
|---|---|
| private void copySettings(XMLSerializer src, XMLSerializer dest)
Deprecated as a consequence of | |
| getDomConfig | back to summary |
|---|---|
| public DOMConfiguration getDomConfig() Implements org. Doc from org. The
| |
| getFilter | back to summary |
|---|---|
| public LSSerializerFilter getFilter() Implements org. When the application provides a filter, the serializer will call out to the filter before serializing each Node. Attribute nodes are never passed to the filter. The filter implementation can choose to remove the node from the stream or to terminate the serialization early. | |
| getNewLine | back to summary |
|---|---|
| public String getNewLine() Implements org. DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out. The only permitted values are these:
The default value for this attribute is null.
| |
| getParameter | back to summary |
|---|---|
| public Object getParameter(String name) throws DOMException Implements org. DOM L3-EXPERIMENTAL: Getter for boolean and object parameters
| |
| getParameterNames | back to summary |
|---|---|
| public DOMStringList getParameterNames() Implements org. DOM Level 3 Core CR - Experimental.
The list of the parameters supported by this
| |
| initSerializer | back to summary |
|---|---|
| private void initSerializer(XMLSerializer ser)
Deprecated as a consequence of | |
| prepareForSerialization | back to summary |
|---|---|
| private void prepareForSerialization(XMLSerializer ser, Node node)
Deprecated as a consequence of | |
| setFilter | back to summary |
|---|---|
| public void setFilter(LSSerializerFilter filter) Implements org. When the application provides a filter, the serializer will call out to the filter before serializing each Node. Attribute nodes are never passed to the filter. The filter implementation can choose to remove the node from the stream or to terminate the serialization early. | |
| setNewLine | back to summary |
|---|---|
| public void setNewLine(String newLine) Implements org. DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out. The only permitted values are these:
The default value for this attribute is null.
| |
| setParameter | back to summary |
|---|---|
| public void setParameter(String name, Object value) throws DOMException Implements org. DOM L3-EXPERIMENTAL: Setter for boolean and object parameters
| |
| verify | back to summary |
|---|---|
| private void verify(Node node, boolean verifyNames, boolean xml11Version) | |
| write | back to summary |
|---|---|
| public boolean write(Node node, LSOutput destination) throws LSException Implements org. Serialize the specified node as described above in the general
description of the
If no encoding is reachable through the above properties, a default encoding of "UTF-8" will be used. If the specified encoding is not supported an "unsupported-encoding" error is raised. If no output is specified in the LSOutput, a
"no-output-specified" error is raised.
| |
| writeToString | back to summary |
|---|---|
| public String writeToString(Node wnode) throws DOMException, LSException Implements org. DOM L3 EXPERIMENTAL:
Serialize the specified node as described above in the description of
| |
| writeToURI | back to summary |
|---|---|
| public boolean writeToURI(Node node, String URI) throws LSException Implements org. Serialize the specified node as described above in the general
description of the
If no encoding is reachable through the above properties, a default encoding of "UTF-8" will be used. If the specified encoding is not supported an "unsupported-encoding" error is raised.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static Method | |
| private static Method | |
| private static Method | |
| private static boolean |
| Access | Constructor and Description |
|---|---|
| private |
| fgDocumentGetInputEncodingMethod | back to summary |
|---|---|
| private static Method fgDocumentGetInputEncodingMethod | |
| fgDocumentGetXmlEncodingMethod | back to summary |
|---|---|
| private static Method fgDocumentGetXmlEncodingMethod | |
| fgDocumentGetXmlVersionMethod | back to summary |
|---|---|
| private static Method fgDocumentGetXmlVersionMethod | |
| fgDocumentMethodsAvailable | back to summary |
|---|---|
| private static boolean fgDocumentMethodsAvailable | |
| DocumentMethods | back to summary |
|---|---|
| private DocumentMethods() | |