gov.nasa.pds.harvest.util
Class XMLExtractor
java.lang.Object
gov.nasa.pds.harvest.util.XMLExtractor
public class XMLExtractor
- extends Object
- Author:
- pramirez
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLExtractor
public XMLExtractor()
throws ParserConfigurationException,
XPathFactoryConfigurationException
- Throws:
ParserConfigurationException
XPathFactoryConfigurationException
XMLExtractor
public XMLExtractor(File src)
throws ParserConfigurationException,
XPathFactoryConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
XPathFactoryConfigurationException
SAXException
IOException
XMLExtractor
public XMLExtractor(String src)
throws ParserConfigurationException,
SAXException,
IOException,
XPathFactoryConfigurationException
- Throws:
ParserConfigurationException
SAXException
IOException
XPathFactoryConfigurationException
setDefaultNamespace
public void setDefaultNamespace(String uri)
setNamespaceContext
public void setNamespaceContext(NamespaceContext context)
validate
public void validate(String schema)
throws SAXException,
IOException
- Throws:
SAXException
IOException
getValueFromDoc
public String getValueFromDoc(String expression)
throws XPathExpressionException
- Throws:
XPathExpressionException
getValueFromItem
public String getValueFromItem(String expression,
Object item)
throws XPathExpressionException
- Throws:
XPathExpressionException
getNodeFromDoc
public Node getNodeFromDoc(String expression)
throws XPathExpressionException
- Throws:
XPathExpressionException
getNodeFromItem
public Node getNodeFromItem(String expression,
Object item)
throws XPathExpressionException
- Throws:
XPathExpressionException
getValuesFromDoc
public List<String> getValuesFromDoc(String expression)
throws XPathExpressionException
- Throws:
XPathExpressionException
getValuesFromItem
public List<String> getValuesFromItem(String expression,
Object item)
throws XPathExpressionException
- Throws:
XPathExpressionException
getDocNode
public Node getDocNode()
getNodesFromDoc
public NodeList getNodesFromDoc(String expression)
throws XPathExpressionException
- Throws:
XPathExpressionException
getNodesFromItem
public NodeList getNodesFromItem(String expression,
Object item)
throws XPathExpressionException
- Throws:
XPathExpressionException
getValue
public String getValue(String expression,
String xmlStr)
throws XPathExpressionException,
SAXException,
IOException
- Throws:
XPathExpressionException
SAXException
IOException
main
public static void main(String[] args)
Copyright © 2005-2010 Planetary Data System. All Rights Reserved.