public class XMLExtractor extends Object
| Constructor and Description |
|---|
XMLExtractor()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAttributeValuesFromDoc(String expression)
Gets the values of the given expression.
|
List<String> |
getAttributeValuesFromItem(String expression,
Object item)
Gets the values of the given expression.
|
static String |
getDefaultNamespace()
Get the default namespace URI.
|
net.sf.saxon.om.DocumentInfo |
getDocNode()
Gets the document node of the XML document.
|
net.sf.saxon.tree.tiny.TinyElementImpl |
getNodeFromDoc(String expression)
Gets a Node object from the given expression.
|
net.sf.saxon.tree.tiny.TinyElementImpl |
getNodeFromItem(String expression,
Object item)
Gets a Node object from the given expression.
|
List<net.sf.saxon.tree.tiny.TinyElementImpl> |
getNodesFromDoc(String expression)
Gets Node objects from the given expression.
|
List<net.sf.saxon.tree.tiny.TinyElementImpl> |
getNodesFromItem(String expression,
Object item)
Gets Node objects from the given expression.
|
String |
getValueFromDoc(String expression)
Gets the value of the given expression.
|
String |
getValueFromItem(String expression,
Object item)
Gets the value of the given expression.
|
List<String> |
getValuesFromDoc(String expression)
Gets the values of the given expression.
|
List<String> |
getValuesFromItem(String expression,
Object item)
Gets the values of the given expression.
|
void |
parse(File src)
Parse the given file.
|
void |
parse(String src)
Parse the given file.
|
static void |
setDefaultNamespace(String uri)
Sets the default namespace URI.
|
static void |
setNamespaceContext(PDSNamespaceContext context)
Sets the Namespace Context to support handling of namespaces
in XML documents.
|
public void parse(File src) throws net.sf.saxon.trans.XPathException
src - An XML file.net.sf.saxon.trans.XPathException - If an error occurred while parsing the XML file.public void parse(String src) throws net.sf.saxon.trans.XPathException
src - An XML file.net.sf.saxon.trans.XPathException - If an error occurred while parsing the XML file.public static void setDefaultNamespace(String uri)
uri - A URI.public static String getDefaultNamespace()
public static void setNamespaceContext(PDSNamespaceContext context)
context - The NamespaceContext object.public String getValueFromDoc(String expression) throws XPathExpressionException, net.sf.saxon.trans.XPathException
expression - An XPath expression.XPathExpressionException - If the given expression was malformed.net.sf.saxon.trans.XPathExceptionpublic String getValueFromItem(String expression, Object item) throws XPathExpressionException
expression - An XPath expression.item - The starting point from which to evaluate the
XPath expression.XPathExpressionException - If the given expression was malformed.public net.sf.saxon.tree.tiny.TinyElementImpl getNodeFromDoc(String expression) throws XPathExpressionException
expression - An XPath expression.XPathExpressionException - If the given expression was malformed.public net.sf.saxon.tree.tiny.TinyElementImpl getNodeFromItem(String expression, Object item) throws XPathExpressionException
expression - An XPath expression.item - The starting point from which to evaluate the
XPath expression.XPathExpressionException - If the given expression was malformed.public List<String> getValuesFromDoc(String expression) throws XPathExpressionException
expression - An XPath expression.XPathExpressionException - If the given expression was malformed.public List<String> getValuesFromItem(String expression, Object item) throws XPathExpressionException
expression - An XPath expression.item - The starting point from which to evaluate the
XPath expression.XPathExpressionException - If the given expression was malformed.public net.sf.saxon.om.DocumentInfo getDocNode()
throws net.sf.saxon.trans.XPathException
net.sf.saxon.trans.XPathExceptionpublic List<net.sf.saxon.tree.tiny.TinyElementImpl> getNodesFromDoc(String expression) throws XPathExpressionException
expression - An XPath expression.XPathExpressionException - If the given expression was malformed.public List<net.sf.saxon.tree.tiny.TinyElementImpl> getNodesFromItem(String expression, Object item) throws XPathExpressionException
expression - An XPath expression.item - The starting point from which to evaluate the
XPath expression.XPathExpressionException - If the given expression was malformed.public List<String> getAttributeValuesFromDoc(String expression) throws XPathExpressionException
expression - An XPath expression.XPathExpressionException - If the given expression was malformed.public List<String> getAttributeValuesFromItem(String expression, Object item) throws XPathExpressionException
expression - An XPath expression.item - The starting point from which to evaluate the
XPath expression.XPathExpressionException - If the given expression was malformed.Copyright © 2010–2018 Planetary Data System. All rights reserved.