java.lang.Object
org.sejda.sambox.util.XMLUtil
This class with handle some simple XML operations.
- Author:
- Ben Litchfield
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetNodeValue(Element node) This will get the text value of an element.static Documentparse(InputStream is) This will parse an XML stream and create a DOM document.static Documentparse(InputStream is, boolean nsAware) This will parse an XML stream and create a DOM document.
-
Method Details
-
parse
This will parse an XML stream and create a DOM document.- Parameters:
is- The stream to get the XML from.- Returns:
- The DOM document.
- Throws:
IOException- It there is an error creating the dom.
-
parse
This will parse an XML stream and create a DOM document.- Parameters:
is- The stream to get the XML from.nsAware- activates namespace awareness of the parser- Returns:
- The DOM document.
- Throws:
IOException- It there is an error creating the dom.
-
getNodeValue
This will get the text value of an element.- Parameters:
node- The node to get the text value for.- Returns:
- The text of the node.
-