public class DomUtils extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
PRETTY_PRINT
The Constant PRETTY_PRINT.
|
Modifier and Type | Method and Description |
---|---|
static Document |
createDocumentFromNode(Node node)
Creates the document from node.
|
static Document |
parse(String xmlString)
Parses the.
|
static String |
serialiseToXML(Document document)
Serialise to xml.
|
static String |
serialiseToXML(Document document,
boolean prettyPrint)
Serialise to xml.
|
public static final boolean PRETTY_PRINT
public static final String serialiseToXML(Document document)
document
- the documentpublic static final String serialiseToXML(Document document, boolean prettyPrint)
document
- the documentprettyPrint
- the pretty printpublic static final Document createDocumentFromNode(Node node) throws ParserConfigurationException
node
- the nodeParserConfigurationException
- the parser configuration exceptionpublic static final Document parse(String xmlString) throws SAXException, IOException, ParserConfigurationException
xmlString
- the xml stringSAXException
- the sAX exceptionIOException
- Signals that an I/O exception has occurred.ParserConfigurationException
- the parser configuration exceptionAll content is available under the Open Government Licence, except where otherwise stated
All example source code is available under Apache 2.0, except where otherwise stated