Package net.datenwerke.rs.utils.xml
Interface XMLUtilsService
- All Known Implementing Classes:
XMLUtilsServiceImpl
public interface XMLUtilsService
-
Method Summary
Modifier and TypeMethodDescriptionCreates an empty JAXP XML document.getXMLNodeAsString(Node node) Transforms an XML node (from a JAXP XML document) into a formatted string.getXMLNodeAsString(Node node, boolean omitXMLDeclaration) getXPath(String string, NamespaceContext namespaceContext) readInputFileIntoJAXPDoc(File file) Reads a file into a JAXP XML document.Reads an InputStream into a JAXP XML document.readStringIntoJAXPDoc(String data) readStringIntoJAXPDoc(String data, String encoding)
-
Method Details
-
readStringIntoJAXPDoc
Document readStringIntoJAXPDoc(String data) throws ParserConfigurationException, SAXException, IOException -
readStringIntoJAXPDoc
Document readStringIntoJAXPDoc(String data, String encoding) throws ParserConfigurationException, SAXException, IOException -
readInputFileIntoJAXPDoc
Document readInputFileIntoJAXPDoc(File file) throws ParserConfigurationException, SAXException, IOException Reads a file into a JAXP XML document.- Parameters:
file- The input file.- Returns:
- The JAXP XML document.
- Throws:
ParserConfigurationExceptionSAXExceptionIOException
-
readInputStreamIntoJAXPDoc
Document readInputStreamIntoJAXPDoc(InputStream in) throws ParserConfigurationException, SAXException, IOException Reads an InputStream into a JAXP XML document.- Parameters:
in- The input stream.- Returns:
- The JAXP XML document.
- Throws:
ParserConfigurationExceptionSAXExceptionIOException
-
getNewEmptyJAXPDoc
Document getNewEmptyJAXPDoc()Creates an empty JAXP XML document.- Returns:
- An empty JAXP XML document.
-
getXMLNodeAsString
Transforms an XML node (from a JAXP XML document) into a formatted string.- Parameters:
node- The node to transform.- Returns:
- A string representation of the node.
-
getXMLNodeAsString
-
getXPath
- Throws:
XPathException
-
getXPath
- Throws:
XPathException
-