Class XmlDomWriter

java.lang.Object
com.lowagie.text.xml.XmlDomWriter

public class XmlDomWriter extends Object
  • Field Details

    • fOut

      protected PrintWriter fOut
      Print writer.
    • fCanonical

      protected boolean fCanonical
      Canonical output.
    • fXML11

      protected boolean fXML11
      Processing 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

      public void setOutput(OutputStream stream, String encoding) throws UnsupportedEncodingException
      Sets the output stream for printing.
      Parameters:
      stream - the OutputString
      encoding - the encoding
      Throws:
      UnsupportedEncodingException - on error of encoding
    • setOutput

      public void setOutput(Writer writer)
      Sets the output writer.
      Parameters:
      writer - the writer to set
    • write

      public void write(Node node)
      Writes the specified node, recursively.
      Parameters:
      node - the Node to write
    • sortAttributes

      protected Attr[] sortAttributes(NamedNodeMap attrs)
      Returns a sorted list of attributes.
      Parameters:
      attrs - the NameNomeMap of attributes
      Returns:
      a Attr array of sorted attributes
    • normalizeAndPrint

      protected void normalizeAndPrint(String s, boolean isAttValue)
      Normalizes and prints the given string.
      Parameters:
      s - the String to normalize and print
      isAttValue - boolean
    • normalizeAndPrint

      protected void normalizeAndPrint(char c, boolean isAttValue)
      Normalizes and print the given character.
      Parameters:
      c - the character
      isAttValue - boolean