Class XmlProcessor

  • All Implemented Interfaces:
    java.io.Serializable

    class XmlProcessor
    extends java.lang.Object
    implements java.io.Serializable
    • Field Detail

      • ignoreComments

        private boolean ignoreComments
      • ignoreProcessingInstructions

        private boolean ignoreProcessingInstructions
      • ignoreWhitespace

        private boolean ignoreWhitespace
      • prettyPrint

        private boolean prettyPrint
      • prettyIndent

        private int prettyIndent
      • dom

        private transient javax.xml.parsers.DocumentBuilderFactory dom
      • xform

        private transient javax.xml.transform.TransformerFactory xform
      • documentBuilderPool

        private transient java.util.concurrent.LinkedBlockingDeque<javax.xml.parsers.DocumentBuilder> documentBuilderPool
    • Constructor Detail

      • XmlProcessor

        XmlProcessor()
    • Method Detail

      • readObject

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • configureSecureDBF

        private void configureSecureDBF​(javax.xml.parsers.DocumentBuilderFactory dbf)
      • configureSecureTF

        private void configureSecureTF​(javax.xml.transform.TransformerFactory xform)
      • setDefault

        final void setDefault()
      • setIgnoreComments

        final void setIgnoreComments​(boolean b)
      • setIgnoreWhitespace

        final void setIgnoreWhitespace​(boolean b)
      • setIgnoreProcessingInstructions

        final void setIgnoreProcessingInstructions​(boolean b)
      • setPrettyPrinting

        final void setPrettyPrinting​(boolean b)
      • setPrettyIndent

        final void setPrettyIndent​(int i)
      • isIgnoreComments

        final boolean isIgnoreComments()
      • isIgnoreProcessingInstructions

        final boolean isIgnoreProcessingInstructions()
      • isIgnoreWhitespace

        final boolean isIgnoreWhitespace()
      • isPrettyPrinting

        final boolean isPrettyPrinting()
      • getPrettyIndent

        final int getPrettyIndent()
      • toXmlNewlines

        private java.lang.String toXmlNewlines​(java.lang.String rv)
      • getDomFactory

        private javax.xml.parsers.DocumentBuilderFactory getDomFactory()
      • getDocumentBuilderFromPool

        private javax.xml.parsers.DocumentBuilder getDocumentBuilderFromPool()
                                                                      throws javax.xml.parsers.ParserConfigurationException
        Throws:
        javax.xml.parsers.ParserConfigurationException
      • returnDocumentBuilderToPool

        private void returnDocumentBuilderToPool​(javax.xml.parsers.DocumentBuilder db)
      • addProcessingInstructionsTo

        private void addProcessingInstructionsTo​(java.util.List<org.w3c.dom.Node> list,
                                                 org.w3c.dom.Node node)
      • addCommentsTo

        private void addCommentsTo​(java.util.List<org.w3c.dom.Node> list,
                                   org.w3c.dom.Node node)
      • addTextNodesToRemoveAndTrim

        private void addTextNodesToRemoveAndTrim​(java.util.List<org.w3c.dom.Node> toRemove,
                                                 org.w3c.dom.Node node)
      • toXml

        final org.w3c.dom.Node toXml​(java.lang.String defaultNamespaceUri,
                                     java.lang.String xml)
                              throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • newDocument

        org.w3c.dom.Document newDocument()
      • toString

        private java.lang.String toString​(org.w3c.dom.Node node)
      • escapeAttributeValue

        java.lang.String escapeAttributeValue​(java.lang.Object value)
      • escapeTextValue

        java.lang.String escapeTextValue​(java.lang.Object value)
      • escapeElementValue

        private java.lang.String escapeElementValue​(java.lang.String s)
      • elementToXmlString

        private java.lang.String elementToXmlString​(org.w3c.dom.Element element)
      • ecmaToXmlString

        final java.lang.String ecmaToXmlString​(org.w3c.dom.Node node)
      • beautifyElement

        private void beautifyElement​(org.w3c.dom.Element e,
                                     int indent)