public class DOMUtils extends Object
Modifier and Type | Method | Description |
---|---|---|
static DocumentBuilder |
createDocumentBuilder() |
Create a new (namespace-aware) DocumentBuilder
|
static Document |
parse(File file) |
|
static Document |
parse(InputStream xml) |
|
static Document |
parse(Reader xml) |
|
static Document |
parse(String xml) |
|
static Document |
parse(InputSource src) |
|
static String |
pretty(Source source) |
Serialise the provided source to a pretty-printed String with the default indent settings
|
static void |
pretty(Source input,
StreamResult output) |
Serialise the provided source to the provided destination, pretty-printing with the default indent settings
|
static String |
pretty(Node source) |
Serialise the provided Node to a pretty-printed String with the default indent settings
|
static String |
serialise(Node n) |
|
static void |
serialise(Node n,
File file) |
|
static void |
serialise(Node n,
OutputStream os) |
|
static void |
serialise(Node n,
Writer writer) |
|
static void |
serialise(Node n,
StreamResult result) |
|
static byte[] |
serialiseBytes(Node n) |
public static DocumentBuilder createDocumentBuilder()
public static Document parse(InputStream xml)
public static Document parse(InputSource src)
public static byte[] serialiseBytes(Node n)
public static void serialise(Node n, StreamResult result)
public static void serialise(Node n, OutputStream os)
public static String pretty(Node source)
source
- the input Nodepublic static String pretty(Source source)
source
- the input Sourcepublic static void pretty(Source input, StreamResult output)
input
- the sourceoutput
- the destinationCopyright © 2018. All rights reserved.