public class XPathNavigatorBase extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Document |
xmlDocument |
protected XPath |
xPath |
| Modifier | Constructor and Description |
|---|---|
protected |
XPathNavigatorBase(byte[] xmlBytes)
Custom constructor.
|
protected |
XPathNavigatorBase(InputStream xmlStream)
Custom constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(String xPath,
QName qname)
Evaluate an XPath expression on XML Document.
|
byte[] |
getXmlBytes()
Return the XML Document as Byte Array.
|
InputStream |
getXmlStream()
Return the XML Document as input stream.
|
String |
readAttribute(String xPath)
Read attribute from XML Document using XPath.
|
Object |
readAttribute(String xPath,
Class xJdfType)
Read attribute from XML Document using XPath and convert to JDF Datatype.
|
void |
updateAttribute(String xPath,
AbstractXJdfType value)
Update attribute in XML Document.
|
void |
updateAttribute(String xPath,
String value)
Update attribute in XML Document.
|
protected XPathNavigatorBase(byte[] xmlBytes)
throws Exception
xmlBytes - Exceptionprotected XPathNavigatorBase(InputStream xmlStream) throws Exception
Exceptionpublic String readAttribute(String xPath) throws XPathExpressionException
xPath - XPath expression of attribute to read.XPathExpressionException - Is being thrown in case an exception occurs.public Object readAttribute(String xPath, Class xJdfType) throws XPathExpressionException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
xPath - XPath expression to evaluate.xJdfType - Target JDF Data Type of attribute.XPathExpressionExceptionSecurityExceptionNoSuchMethodExceptionInvocationTargetExceptionIllegalArgumentExceptionIllegalAccessExceptionInstantiationExceptionpublic Object evaluate(String xPath, QName qname) throws XPathExpressionException
xPath - XPath expression to execute to.qname - QName as javax.xml.xpath.XPathConstantsXPathExpressionException - Is thrown in case an XPath Exception occurs.public void updateAttribute(String xPath, AbstractXJdfType value) throws Exception
xPath - XPath expression of attribute to read.Exception - Is being thrown in case an exception occurs.public void updateAttribute(String xPath, String value) throws Exception
xPath - XPath expression of attribute to read.Exception - Is being thrown in case an exception occurs.public InputStream getXmlStream() throws Exception
ExceptionCopyright © 2013. All Rights Reserved.