Class XMLUtils


  • public class XMLUtils
    extends Object
    Misc XML utils
    Author:
    The Red5 Project, Luke Hubbard, Codegent Ltd (luke@codegent.com), Paul Gregoire (mondain@gmail.com)
    • Field Detail

      • log

        protected static org.slf4j.Logger log
        Logger
    • Constructor Detail

      • XMLUtils

        public XMLUtils()
    • Method Detail

      • stringToDoc

        public static Document stringToDoc​(String str)
                                    throws IOException
        Converts string representation of XML into Document
        Parameters:
        str - String representation of XML
        Returns:
        DOM object
        Throws:
        IOException - I/O exception
      • docToString

        public static String docToString​(Document dom)
        Converts doc to String
        Parameters:
        dom - DOM object to convert
        Returns:
        XML as String
      • docToString1

        public static String docToString1​(Document dom)
        Convert a DOM tree into a String using Dom2Writer
        Parameters:
        dom - DOM object to convert
        Returns:
        XML as String
      • docToString2

        public static String docToString2​(Document domDoc)
                                   throws IOException
        Convert a DOM tree into a String using transform
        Parameters:
        domDoc - DOM object
        Returns:
        XML as String
        Throws:
        IOException - I/O exception