it.eng.rdlab.soa3.pm.connector.utils
Class XMLUtils
java.lang.Object
it.eng.rdlab.soa3.pm.connector.utils.XMLUtils
public class XMLUtils
- extends Object
Utilities for XML documents
- Author:
- Ciro Formisano (ENG)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLUtils
public XMLUtils()
document2String
public static String document2String(Document document)
throws Exception
- Parameters:
document -
- Returns:
-
- Throws:
Exception
element2String
public static String element2String(Element element)
throws Exception
- Converts a DOM element into string format
- Parameters:
element -
- Returns:
- a string representation of the XML
- Throws:
Exception
string2Document
public static Document string2Document(String xmlString)
throws Exception
- Converts an xml in string format to a DOM document
- Parameters:
xmlString -
- Returns:
-
- Throws:
Exception
createElement
public static Element createElement(Document rootDocument,
String elementName,
String textValue,
String namespace)
- Parameters:
rootDocument - elementName - textValue - namespace -
- Returns:
createNullElement
public static Element createNullElement(Document rootDocument,
String elementName,
String namespace)
- Parameters:
rootDocument - elementName - namespace -
- Returns:
Copyright © 2012. All Rights Reserved.