| Modifier and Type | Class and Description |
|---|---|
static class |
XMLDocument.Builder |
| Modifier and Type | Method and Description |
|---|---|
Optional<org.gesis.commons.xml.LocationInfo> |
getLocationInfo(Node node) |
String |
getNamespace()
The namespace of the root element of the document.
|
static XMLDocument.Builder |
newBuilder() |
Node |
selectNode(Node context,
String xPath) |
Node |
selectNode(String xPath) |
List<Node> |
selectNodes(Node context,
String locationPath) |
List<Node> |
selectNodes(String xPath) |
void |
setNamespaceContext(NamespaceContext namespaceContext) |
void |
setRootElement(String location,
NamespaceContext nsContext)
Set the root of the document to the element located at the given XPath.
|
public void setNamespaceContext(NamespaceContext namespaceContext)
public void setRootElement(String location, NamespaceContext nsContext) throws XPathExpressionException
location - the XPath of the element that should become the root.nsContext - the namespace context of the XPath.XPathExpressionException - if the XPath cannot be evaluated.public Node selectNode(String xPath) throws XPathExpressionException
XPathExpressionExceptionpublic Node selectNode(Node context, String xPath) throws XPathExpressionException
XPathExpressionExceptionpublic List<Node> selectNodes(Node context, String locationPath) throws XPathExpressionException
XPathExpressionExceptionpublic List<Node> selectNodes(String xPath) throws XPathExpressionException
XPathExpressionExceptionpublic String getNamespace()
public static XMLDocument.Builder newBuilder()
Copyright © 2025 CESSDA ERIC. All rights reserved.