public class DocumentTools
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static DocumentTools |
INSTANCE |
| Constructor and Description |
|---|
DocumentTools() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(org.w3c.dom.Document bundleDocument) |
javax.xml.parsers.DocumentBuilder |
getDocumentBuilder() |
javax.xml.transform.Transformer |
getTransformer() |
javax.xml.transform.Transformer |
getTransformer(javax.xml.transform.stream.StreamSource stylesheet) |
javax.xml.xpath.XPath |
newXPath()
Returns a new xPath that can be used to query a document
|
org.w3c.dom.Document |
parse(java.io.File file) |
org.w3c.dom.Document |
parse(java.io.InputStream inputStream)
Parses an input stream into a document object
|
org.w3c.dom.Document |
parse(java.lang.String string) |
public static final DocumentTools INSTANCE
public org.w3c.dom.Document parse(java.io.File file)
throws DocumentParseException
DocumentParseExceptionpublic org.w3c.dom.Document parse(java.lang.String string)
throws DocumentParseException
DocumentParseExceptionpublic org.w3c.dom.Document parse(java.io.InputStream inputStream)
throws DocumentParseException
inputStream - The input stream to parse into a documentDocumentParseException - Thrown if there is an exception while parsing the documentpublic javax.xml.xpath.XPath newXPath()
public javax.xml.transform.Transformer getTransformer()
public javax.xml.transform.Transformer getTransformer(javax.xml.transform.stream.StreamSource stylesheet)
public void cleanup(org.w3c.dom.Document bundleDocument)
public javax.xml.parsers.DocumentBuilder getDocumentBuilder()