public class XMLUtils extends Object
| Constructor and Description |
|---|
XMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createStringFromDomTree(Node tree)
This method converts a node of a tree to a string representation.
|
static Document |
parseXMLFileFromInputStream(InputStream in) |
static Document |
parseXMLFileToDOM(String XMLdoc)
This method parses a string using the Document Builder parser
|
public static Document parseXMLFileToDOM(String XMLdoc) throws ParserConfigurationException, SAXException, IOException
XMLdoc: - the string to parseParserConfigurationExceptionSAXExceptionIOExceptionpublic static String createStringFromDomTree(Node tree) throws TransformerException
tree: - The node of a document that will be transformedTransformerException - failed to transform the DOMTree to Stringpublic static Document parseXMLFileFromInputStream(InputStream in) throws SAXException, IOException, ParserConfigurationException
Copyright © 2014. All Rights Reserved.