Class DOMWriter


  • public final class DOMWriter
    extends java.lang.Object

    Static utility class able to write a DOM tree (or a fragment of it) as markup.

    Since:
    2.0.0
    • Constructor Detail

      • DOMWriter

        private DOMWriter()
    • Method Detail

      • write

        public static void write​(INode node,
                                 java.io.Writer writer)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeCDATASection

        public static void writeCDATASection​(CDATASection cdataSection,
                                             java.io.Writer writer)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • writeComment

        public static void writeComment​(Comment comment,
                                        java.io.Writer writer)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • writeDocType

        public static void writeDocType​(DocType docType,
                                        java.io.Writer writer)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • writeDocument

        public static void writeDocument​(Document document,
                                         java.io.Writer writer)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • writeElement

        public static void writeElement​(Element element,
                                        java.io.Writer writer)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • writeProcessingInstruction

        public static void writeProcessingInstruction​(ProcessingInstruction processingInstruction,
                                                      java.io.Writer writer)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • writeText

        public static void writeText​(Text text,
                                     java.io.Writer writer)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writeXmlDeclaration

        public static void writeXmlDeclaration​(XmlDeclaration xmlDeclaration,
                                               java.io.Writer writer)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • validateNotNull

        private static void validateNotNull​(java.lang.Object obj,
                                            java.lang.String message)