public class XmlTools extends Object
| Constructor | Description |
|---|---|
XmlTools() |
| Modifier and Type | Method | Description |
|---|---|---|
static org.jdom2.input.SAXBuilder |
getBuilder() |
|
static String |
prettyPrintDocument(org.jdom2.Document doc) |
Pretty prints a document.
|
static String |
printDocument(org.jdom2.Document doc) |
Prints a document.
|
static org.jdom2.Document |
readDocument(File file) |
Reads an XML document from File.
|
static org.jdom2.Document |
readDocument(InputStream is) |
Reads an XML document from File.
|
static org.jdom2.Document |
readDocument(String doc) |
Read an XML document from String.
|
static org.jdom2.Document |
readDocument(URL url) |
Read an XML document from web.
|
public static org.jdom2.input.SAXBuilder getBuilder()
public static org.jdom2.Document readDocument(File file) throws IOException, org.jdom2.JDOMException
file - the document to readIOException - Signals that an I/O exception has occurred.org.jdom2.JDOMException - the jDOM exceptionpublic static org.jdom2.Document readDocument(URL url) throws IOException, URISyntaxException, org.jdom2.JDOMException
url - the url to the documentIOException - Signals that an I/O exception has occurred.URISyntaxException - the uRI syntax exceptionorg.jdom2.JDOMException - the jDOM exceptionpublic static org.jdom2.Document readDocument(InputStream is) throws IOException, org.jdom2.JDOMException
is - the stream containing the documentIOException - Signals that an I/O exception has occurred.org.jdom2.JDOMException - the jDOM exceptionpublic static org.jdom2.Document readDocument(String doc) throws IOException, org.jdom2.JDOMException
doc - the string containing the XML documentIOException - Signals that an I/O exception has occurred.org.jdom2.JDOMException - the jDOM exceptionpublic static String printDocument(org.jdom2.Document doc)
doc - the documentpublic static String prettyPrintDocument(org.jdom2.Document doc)
doc - the documentCopyright © 2018 SEMS project @ University of Rostock. All rights reserved.