public class XMLExtractor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_NAMESPACE |
static java.lang.String |
SCHEMA_LOCATION_XPATH |
static java.lang.String |
TARGET_NAMESPACE |
static java.lang.String |
XML_MODEL_XPATH |
Constructor and Description |
---|
XMLExtractor(net.sf.saxon.om.DocumentInfo xml)
Constructor.
|
XMLExtractor(java.io.File file) |
XMLExtractor(org.xml.sax.InputSource source) |
XMLExtractor(java.lang.String url)
Constructor.
|
XMLExtractor(java.net.URL url)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultNamespace() |
net.sf.saxon.om.DocumentInfo |
getDocNode()
Gets the document node of the XML document.
|
net.sf.saxon.tinytree.TinyNodeImpl |
getNodeFromDoc(java.lang.String expression)
Gets a Node object from the given expression.
|
net.sf.saxon.tinytree.TinyNodeImpl |
getNodeFromItem(java.lang.String expression,
java.lang.Object item)
Gets a Node object from the given expression.
|
java.util.List<net.sf.saxon.tinytree.TinyNodeImpl> |
getNodesFromDoc(java.lang.String expression)
Gets Node objects from the given expression.
|
java.util.List<net.sf.saxon.tinytree.TinyNodeImpl> |
getNodesFromItem(java.lang.String expression,
java.lang.Object item)
Gets Node objects from the given expression.
|
java.lang.String |
getSchemaLocation() |
java.lang.String |
getSystemId() |
java.lang.String |
getTargetNamespace() |
java.lang.String |
getValueFromDoc(java.lang.String expression)
Gets the value of the given expression.
|
java.lang.String |
getValueFromItem(java.lang.String expression,
java.lang.Object item)
Gets the value of the given expression.
|
java.util.List<java.lang.String> |
getValuesFromDoc(java.lang.String expression)
Gets the values of the given expression.
|
java.util.List<java.lang.String> |
getValuesFromItem(java.lang.String expression,
java.lang.Object item)
Gets the values of the given expression.
|
java.util.List<java.lang.String> |
getXmlModels() |
public static final java.lang.String SCHEMA_LOCATION_XPATH
public static final java.lang.String XML_MODEL_XPATH
public static final java.lang.String DEFAULT_NAMESPACE
public static final java.lang.String TARGET_NAMESPACE
public XMLExtractor(net.sf.saxon.om.DocumentInfo xml) throws javax.xml.xpath.XPathExpressionException, net.sf.saxon.trans.XPathException
xml
- A parsed XML document.net.sf.saxon.trans.XPathException
- If an error occurred while parsing the given
xml file.javax.xml.xpath.XPathExpressionException
- If an error occurred while setting up
the default namespace.public XMLExtractor(java.net.URL url) throws net.sf.saxon.trans.XPathException, javax.xml.xpath.XPathExpressionException
xmlFile
- An xml file.net.sf.saxon.trans.XPathException
- If an error occurred while parsing the given
xml file.javax.xml.xpath.XPathExpressionException
- If an error occurred while setting up
the default namespace.public XMLExtractor(org.xml.sax.InputSource source) throws net.sf.saxon.trans.XPathException, javax.xml.xpath.XPathExpressionException
net.sf.saxon.trans.XPathException
javax.xml.xpath.XPathExpressionException
public XMLExtractor(java.io.File file) throws net.sf.saxon.trans.XPathException, javax.xml.xpath.XPathExpressionException, java.net.MalformedURLException
net.sf.saxon.trans.XPathException
javax.xml.xpath.XPathExpressionException
java.net.MalformedURLException
public XMLExtractor(java.lang.String url) throws net.sf.saxon.trans.XPathException, javax.xml.xpath.XPathExpressionException, java.net.MalformedURLException
xmlFile
- An xml file.net.sf.saxon.trans.XPathException
- If an error occurred while parsing the given
xml file.javax.xml.xpath.XPathExpressionException
- If an error occurred while setting up
the default namespace.java.net.MalformedURLException
public java.lang.String getValueFromDoc(java.lang.String expression) throws javax.xml.xpath.XPathExpressionException, net.sf.saxon.trans.XPathException
expression
- An XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.net.sf.saxon.trans.XPathException
public java.lang.String getValueFromItem(java.lang.String expression, java.lang.Object item) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.item
- The starting point from which to evaluate the
XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public net.sf.saxon.tinytree.TinyNodeImpl getNodeFromDoc(java.lang.String expression) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public net.sf.saxon.tinytree.TinyNodeImpl getNodeFromItem(java.lang.String expression, java.lang.Object item) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.item
- The starting point from which to evaluate the
XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public java.util.List<java.lang.String> getValuesFromDoc(java.lang.String expression) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public java.util.List<java.lang.String> getValuesFromItem(java.lang.String expression, java.lang.Object item) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.item
- The starting point from which to evaluate the
XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public net.sf.saxon.om.DocumentInfo getDocNode() throws net.sf.saxon.trans.XPathException
net.sf.saxon.trans.XPathException
public java.util.List<net.sf.saxon.tinytree.TinyNodeImpl> getNodesFromDoc(java.lang.String expression) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public java.util.List<net.sf.saxon.tinytree.TinyNodeImpl> getNodesFromItem(java.lang.String expression, java.lang.Object item) throws javax.xml.xpath.XPathExpressionException
expression
- An XPath expression.item
- The starting point from which to evaluate the
XPath expression.javax.xml.xpath.XPathExpressionException
- If the given expression was malformed.public java.lang.String getSchemaLocation() throws javax.xml.xpath.XPathExpressionException, net.sf.saxon.trans.XPathException
javax.xml.xpath.XPathExpressionException
net.sf.saxon.trans.XPathException
public java.util.List<java.lang.String> getXmlModels() throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionException
public java.lang.String getDefaultNamespace() throws javax.xml.xpath.XPathExpressionException, net.sf.saxon.trans.XPathException
javax.xml.xpath.XPathExpressionException
net.sf.saxon.trans.XPathException
public java.lang.String getTargetNamespace() throws javax.xml.xpath.XPathExpressionException, net.sf.saxon.trans.XPathException
javax.xml.xpath.XPathExpressionException
net.sf.saxon.trans.XPathException
public java.lang.String getSystemId()
Copyright © 2010-2019 Planetary Data System. All Rights Reserved.