public class XMLUtils extends Object
| Constructor and Description |
|---|
XMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Element |
createElement(Document rootDocument,
String elementName,
String textValue,
String namespace) |
static Element |
createNullElement(Document rootDocument,
String elementName,
String namespace) |
static String |
document2String(Document document) |
static String |
element2String(Element element)
Converts a DOM element into string format
|
static Document |
string2Document(String xmlString)
Converts an xml in string format to a DOM document
|
public static String document2String(Document document) throws Exception
document - Exceptionpublic static String element2String(Element element) throws Exception
element - Exceptionpublic static Document string2Document(String xmlString) throws Exception
xmlString - Exceptionpublic static Element createElement(Document rootDocument, String elementName, String textValue, String namespace)
rootDocument - elementName - textValue - namespace - Copyright © 2014. All Rights Reserved.