public class XMLUtils extends Object
| Constructor and Description |
|---|
XMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
convertStreamToXML(InputStream is) |
static Node |
getNode(Node xml,
String NodeListXPath) |
static NodeList |
getNodeList(Node xml,
String NodeListXPath) |
static Iterator<Node> |
getNodeListIterator(NodeList nodeList)
Creates an iterator for all direct child nodes within a given NodeList
that are element nodes:
node.getNodeType() == Node.ELEMENT_NODE
node instanceof Element
|
static Iterator<Node> |
getNodeListIterator(Node xml,
String NodeListXPath) |
static String |
getTextContent(Node xml,
String singleNodeXPath) |
public static String getTextContent(Node xml, String singleNodeXPath) throws XPathExpressionException
xml - The starting context (a Node or a Document, for example).XPathExpressionExceptionpublic static Node getNode(Node xml, String NodeListXPath) throws XPathExpressionException
xml - The starting context (a Node or a Document, for example).XPathExpressionExceptionpublic static NodeList getNodeList(Node xml, String NodeListXPath) throws XPathExpressionException
xml - The starting context (a Node or a Document, for example).XPathExpressionExceptionpublic static Iterator<Node> getNodeListIterator(Node xml, String NodeListXPath) throws XPathExpressionException
XPathExpressionExceptionpublic static Iterator<Node> getNodeListIterator(NodeList nodeList)
public static Document convertStreamToXML(InputStream is)
Copyright © 2014 DuraSpace. All Rights Reserved.