@Component
public class XmlUtilities
extends java.lang.Object
| Constructor and Description |
|---|
XmlUtilities(javax.xml.parsers.DocumentBuilder documentBuilder) |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Document |
getXml(java.io.File manifest)
Reads the file into a
Document and Node.normalize() it. |
org.w3c.dom.Document |
getXml(java.io.InputStream manifest)
Reads the inputstream into a
Document and Node.normalize() it. |
org.w3c.dom.Document |
getXml(java.lang.String string)
Reads the string into a
Document and Node.normalize() it. |
public XmlUtilities(javax.xml.parsers.DocumentBuilder documentBuilder)
public org.w3c.dom.Document getXml(java.io.File manifest)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
org.xml.sax.SAXException
Document and Node.normalize() it.manifest - The xml-file to parse into a Document.javax.xml.parsers.ParserConfigurationException - indicates a serious configuration error.java.io.IOException - if any IO errors occur.org.xml.sax.SAXException - if any parse errors occur.public org.w3c.dom.Document getXml(java.lang.String string)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
org.xml.sax.SAXException
Document and Node.normalize() it.string - The xml-string to parse into a Document.javax.xml.parsers.ParserConfigurationException - indicates a serious configuration error.java.io.IOException - if any IO errors occur.org.xml.sax.SAXException - if any parse errors occur.public org.w3c.dom.Document getXml(java.io.InputStream manifest)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
org.xml.sax.SAXException
Document and Node.normalize() it.manifest - The xml-inputstream to parse into a Document.javax.xml.parsers.ParserConfigurationException - indicates a serious configuration error.java.io.IOException - if any IO errors occur.org.xml.sax.SAXException - if any parse errors occur.