- java.lang.Object
-
- com.itextpdf.text.xml.XmlDomWriter
-
public class XmlDomWriter extends java.lang.Object- Author:
- psoares
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanfCanonicalCanonical output.protected java.io.PrintWriterfOutPrint writer.protected booleanfXML11Processing XML 1.1 document.
-
Constructor Summary
Constructors Constructor Description XmlDomWriter()Default constructor.XmlDomWriter(boolean canonical)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidnormalizeAndPrint(char c, boolean isAttValue)Normalizes and print the given character.protected voidnormalizeAndPrint(java.lang.String s, boolean isAttValue)Normalizes and prints the given string.voidsetCanonical(boolean canonical)Sets whether output is canonical.voidsetOutput(java.io.OutputStream stream, java.lang.String encoding)Sets the output stream for printing.voidsetOutput(java.io.Writer writer)Sets the output writer.protected org.w3c.dom.Attr[]sortAttributes(org.w3c.dom.NamedNodeMap attrs)Returns a sorted list of attributes.voidwrite(org.w3c.dom.Node node)Writes the specified node, recursively.
-
-
-
Method Detail
-
setCanonical
public void setCanonical(boolean canonical)
Sets whether output is canonical.
-
setOutput
public void setOutput(java.io.OutputStream stream, java.lang.String encoding) throws java.io.UnsupportedEncodingExceptionSets the output stream for printing.- Throws:
java.io.UnsupportedEncodingException
-
setOutput
public void setOutput(java.io.Writer writer)
Sets the output writer.
-
write
public void write(org.w3c.dom.Node node)
Writes the specified node, recursively.
-
sortAttributes
protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Returns a sorted list of attributes.
-
normalizeAndPrint
protected void normalizeAndPrint(java.lang.String s, boolean isAttValue)Normalizes and prints the given string.
-
normalizeAndPrint
protected void normalizeAndPrint(char c, boolean isAttValue)Normalizes and print the given character.
-
-