public final class DocumentHelper extends Object
Modifier and Type | Method and Description |
---|---|
static Document |
createDocument()
Creates a new DOM Document
|
static DocumentBuilder |
newDocumentBuilder(XmlOptionsBean xmlOptions)
Creates a new document builder, with sensible defaults
|
static Document |
readDocument(XmlOptionsBean xmlOptions,
InputSource inp)
Parses the given stream via the default (sensible)
DocumentBuilder
|
static Document |
readDocument(XmlOptionsBean xmlOptions,
InputStream inp)
Parses the given stream via the default (sensible)
DocumentBuilder
|
public static DocumentBuilder newDocumentBuilder(XmlOptionsBean xmlOptions)
xmlOptions
- IllegalStateException
- If creating the DocumentBuilder fails, e.g.
due to ParserConfigurationException
.public static Document readDocument(XmlOptionsBean xmlOptions, InputStream inp) throws IOException, SAXException
inp
- Stream to read the XML data fromIOException
SAXException
public static Document readDocument(XmlOptionsBean xmlOptions, InputSource inp) throws IOException, SAXException
inp
- sax source to read the XML data fromIOException
SAXException
public static Document createDocument()