Class XMLUtils


  • public class XMLUtils
    extends java.lang.Object
    Utility class to easily convert an XML object to its String representation.
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.xml.parsers.DocumentBuilderFactory getSecureDocumentBuilderFactory()  
      static java.lang.String getStringFromElement​(org.w3c.dom.Element element)
      Convert an XML element to its String representation.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLUtils

        public XMLUtils()
    • Method Detail

      • getStringFromElement

        public static java.lang.String getStringFromElement​(org.w3c.dom.Element element)
        Convert an XML element to its String representation.
        Parameters:
        element - element to convert to a string
        Returns:
        XML string, or null in the result of a TransformerException
      • getSecureDocumentBuilderFactory

        public static javax.xml.parsers.DocumentBuilderFactory getSecureDocumentBuilderFactory()
                                                                                        throws javax.xml.parsers.ParserConfigurationException
        Throws:
        javax.xml.parsers.ParserConfigurationException