Deprecated
As of JDK 9, Xerces 2.9.0, replaced by
com.
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 | 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
References Deprecated
XMLSerializer is deprecated or references (maybe indirectly) at least one deprecated element.
|
protected static final short | |
protected static final short | |
private XML11Serializer | xml11Serializer
References Deprecated
XML11Serializer is deprecated or references (maybe indirectly) at least one deprecated element.
|
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. DOM L3-EXPERIMENTAL: Check if parameter can be set |
private void | copySettings(XMLSerializer src, XMLSerializer dest)
References Deprecated
XMLSerializer is deprecated or references (maybe indirectly) at least one deprecated element.
|
public DOMConfiguration | getDomConfig()
Implements org. The |
public LSSerializerFilter | getFilter()
Implements org. When the application provides a filter, the serializer will call out to the filter before serializing each Node. |
public String | getNewLine()
Implements org. DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out. |
public Object | getParameter(String
The name of the parameter. name)Implements org. DOM L3-EXPERIMENTAL: Getter for boolean and object parameters |
public DOMStringList | getParameterNames()
Implements org. DOM Level 3 Core CR - Experimental. |
private void | initSerializer(XMLSerializer ser)
References Deprecated
XMLSerializer is deprecated or references (maybe indirectly) at least one deprecated element.
|
private void | prepareForSerialization(XMLSerializer ser, Node node)
References Deprecated
XMLSerializer is deprecated or references (maybe indirectly) at least one deprecated element.
|
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. |
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. |
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. DOM L3-EXPERIMENTAL: Setter for boolean and object parameters |
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. Serialize the specified node as described above in the general
description of the |
public String | Returns: Returns the serialized dataThe node to be written. wnode)Implements org. DOM L3 EXPERIMENTAL: Serialize the specified node as described above in
the description of |
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. Serialize the specified node as described above in the general
description of the |
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
References Deprecated
See corresponding docs for further information. |
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
References Deprecated
See corresponding docs for further information. |
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)
References Deprecated
See corresponding docs for further information. |
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)
References Deprecated
See corresponding docs for further information. |
prepareForSerialization | back to summary |
---|---|
private void prepareForSerialization(XMLSerializer ser, Node node)
References Deprecated
See corresponding docs for further information. |
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.
|