Package com.lowagie.text.xml
Class XmlDomWriter
java.lang.Object
com.lowagie.text.xml.XmlDomWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Canonical output.protected PrintWriter
Print writer.protected boolean
Processing XML 1.1 document. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
normalizeAndPrint
(char c, boolean isAttValue) Normalizes and print the given character.protected void
normalizeAndPrint
(String s, boolean isAttValue) 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
Sets the output writer.protected Attr[]
sortAttributes
(NamedNodeMap attrs) Returns a sorted list of attributes.void
Writes the specified node, recursively.
-
Field Details
-
fOut
Print writer. -
fCanonical
protected boolean fCanonicalCanonical output. -
fXML11
protected boolean fXML11Processing XML 1.1 document.
-
-
Constructor Details
-
XmlDomWriter
public XmlDomWriter()Default constructor. -
XmlDomWriter
public XmlDomWriter(boolean canonical)
-
-
Method Details
-
setCanonical
public void setCanonical(boolean canonical) Sets whether output is canonical.- Parameters:
canonical
- true if canonical, false otherwise
-
setOutput
Sets the output stream for printing.- Parameters:
stream
- the OutputStringencoding
- the encoding- Throws:
UnsupportedEncodingException
- on error of encoding
-
setOutput
Sets the output writer.- Parameters:
writer
- the writer to set
-
write
Writes the specified node, recursively.- Parameters:
node
- the Node to write
-
sortAttributes
Returns a sorted list of attributes.- Parameters:
attrs
- the NameNomeMap of attributes- Returns:
- a Attr array of sorted attributes
-
normalizeAndPrint
Normalizes and prints the given string.- Parameters:
s
- the String to normalize and printisAttValue
- boolean
-
normalizeAndPrint
protected void normalizeAndPrint(char c, boolean isAttValue) Normalizes and print the given character.- Parameters:
c
- the characterisAttValue
- boolean
-