public class DOMWriter extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEFAULT_CANONICAL
Default canonical output (false).
|
protected static boolean |
DEFAULT_NAMESPACES
Default namespaces support (true).
|
protected static boolean |
DEFAULT_SCHEMA_FULL_CHECKING
Default Schema full checking support (false).
|
protected static boolean |
DEFAULT_SCHEMA_VALIDATION
Default Schema validation support (false).
|
protected static boolean |
DEFAULT_VALIDATION
Default validation support (false).
|
protected static String |
LEXICAL_HANDLER_PROPERTY_ID
Lexical handler property id
(http://xml.org/sax/properties/lexical-handler).
|
protected static String |
NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces).
|
protected static String |
SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id
(http://apache.org/xml/features/validation/schema-full-checking).
|
protected static String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id
(http://apache.org/xml/features/validation/schema).
|
protected static String |
VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation).
|
Constructor and Description |
---|
DOMWriter()
Default constructor.
|
DOMWriter(boolean canonical) |
Modifier and Type | Method and Description |
---|---|
protected void |
normalizeAndPrint(char c)
Normalizes and print the given character.
|
protected void |
normalizeAndPrint(String s)
Normalizes and prints the given string.
|
void |
setCanonical(boolean canonical)
Sets whether output is canonical.
|
void |
setOutput(OutputStream stream,
String encoding)
Sets the output stream for printing.
|
void |
setOutput(Writer writer)
Sets the output writer.
|
protected Attr[] |
sortAttributes(NamedNodeMap attrs)
Returns a sorted list of attributes.
|
void |
write(Node node)
Writes the specified node, recursively.
|
protected static final String NAMESPACES_FEATURE_ID
protected static final String VALIDATION_FEATURE_ID
protected static final String SCHEMA_VALIDATION_FEATURE_ID
protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID
protected static final String LEXICAL_HANDLER_PROPERTY_ID
protected static final boolean DEFAULT_NAMESPACES
protected static final boolean DEFAULT_VALIDATION
protected static final boolean DEFAULT_SCHEMA_VALIDATION
protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING
protected static final boolean DEFAULT_CANONICAL
public DOMWriter()
public DOMWriter(boolean canonical)
public void setCanonical(boolean canonical)
public void setOutput(OutputStream stream, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
public void setOutput(Writer writer)
public void write(Node node)
protected Attr[] sortAttributes(NamedNodeMap attrs)
protected void normalizeAndPrint(String s)
protected void normalizeAndPrint(char c)
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries