public class XMLUtils extends Object
Constructor and Description |
---|
XMLUtils() |
Modifier and Type | Method and Description |
---|---|
static ByteArrayOutputStream |
DOMToBAOS(Document doc)
Translates the given DOM Document to a ByteArrayOutputStream
|
static String |
DOMToBasicString(Document doc)
Translates the DOM Document to a basic string.
|
static void |
DOMToFile(Document doc,
String _outputName)
Saves a DOM Document to the specfied file.
|
static String |
DOMToHTML(Document doc)
Translates the DOM Document to a basic string.
|
static String |
DOMToString(Document doc)
Translates the DOM Document to a basic string.
|
static Document |
GetDOM(File file)
Transforms a File into a XML DOM Document using DocumentBuilderFactory.
|
static Document |
GetDOM(InputStream is) |
static Document |
GetDOM(String stream) |
static boolean |
HasAttribute(Node node,
String name) |
static void |
PrettyPrintDOM(File f) |
static void |
PrettyPrintSAX(File f) |
public static void DOMToFile(Document doc, String _outputName) throws Exception
doc
- XML DOM Document_outputName
- FILE PATH & NAMEException
public static void PrettyPrintDOM(File f)
public static void PrettyPrintSAX(File f)
public static String DOMToString(Document doc)
doc
- XML DOM Documentpublic static String DOMToBasicString(Document doc)
doc
- XML DOM Documentpublic static String DOMToHTML(Document doc)
doc
- XML DOM Documentpublic static ByteArrayOutputStream DOMToBAOS(Document doc)
doc
- public static Document GetDOM(File file)
file
- File to be translated.public static Document GetDOM(InputStream is)
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.