Package org.red5.io.utils
Class XMLUtils
- java.lang.Object
-
- org.red5.io.utils.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 Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerlogLogger
-
Constructor Summary
Constructors Constructor Description XMLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringdocToString(Document dom)Converts doc to Stringstatic StringdocToString1(Document dom)Convert a DOM tree into a String using Dom2Writerstatic StringdocToString2(Document domDoc)Convert a DOM tree into a String using transformstatic DocumentstringToDoc(String str)Converts string representation of XML into Document
-
-
-
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
-
-