public class AutoPilotHuge
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ATTR |
static int |
ATTR_NS |
static int |
DESCENDANT |
static int |
DESCENDANT_NS |
static int |
FOLLOWING |
static int |
FOLLOWING_NS |
static int |
PRECEDING |
static int |
PRECEDING_NS |
static int |
SIMPLE |
static int |
SIMPLE_NS |
static int |
UNDEFINED |
Constructor and Description |
---|
AutoPilotHuge()
Use this constructor for delayed binding to VTDNavHuge
which allows the reuse of XPath expression
|
AutoPilotHuge(VTDNavHuge v)
AutoPilotHuge constructor comment.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(VTDNavHuge vnv)
Bind resets the internal state of AutoPilotHuge
so one can attach a VTDNavHuge object to the autopilot
|
void |
clearVariableExprs()
Remove all declared variable expressions
|
void |
clearXPathNameSpaces()
Remove all namespaces bindings
|
void |
declareVariableExpr(java.lang.String varName,
java.lang.String varExpr)
Register the binding between a variableExpr name and variableExpr expression
|
void |
declareXPathNameSpace(java.lang.String prefix,
java.lang.String URL)
This function creates URL ns prefix
and is intended to be called prior to selectXPath
|
int |
evalXPath()
This method returns the next node in the nodeset
it returns -1 if there is no more node
Afer finishing evaluating, don't forget to reset the xpath
|
boolean |
evalXPathToBoolean()
evalXPathToBoolean() evaluates the xpath expression to a boolean
|
double |
evalXPathToNumber()
evalXPathToNumber() evaluates the xpath expression to a double
|
java.lang.String |
evalXPathToString()
evalXPathToString() evaluates the xpath expression to a String
|
java.lang.String |
getExprString()
Convert the expression to a string
For debugging purpose
|
boolean |
iterate()
Iterate over all the selected element nodes in document order.
|
void |
resetXPath()
Reset the XPath so the XPath Expression can
be reused and revaluated in anther context position
|
void |
selectElement(java.lang.String en)
Select the element name before iterating.
|
void |
selectElementNS(java.lang.String ns_URL,
java.lang.String ln)
Select the element name (name space version) before iterating.
|
void |
selectXPath(java.lang.String s)
This method selects the string representing XPath expression
Usually evalXPath is called afterwards
|
public static final int ATTR
public static final int ATTR_NS
public static final int DESCENDANT
public static final int DESCENDANT_NS
public static final int FOLLOWING
public static final int FOLLOWING_NS
public static final int PRECEDING
public static final int PRECEDING_NS
public static final int SIMPLE
public static final int SIMPLE_NS
public static final int UNDEFINED
public AutoPilotHuge()
public AutoPilotHuge(VTDNavHuge v)
java.lang.IllegalArgumentException
- If the VTDNav object is nullpublic void bind(VTDNavHuge vnv)
vnv
- public void clearVariableExprs()
public void clearXPathNameSpaces()
public void declareVariableExpr(java.lang.String varName, java.lang.String varExpr) throws XPathParseExceptionHuge
varName
- varExpr
- XPathParseException
XPathParseExceptionHuge
public void declareXPathNameSpace(java.lang.String prefix, java.lang.String URL)
prefix
- URL
- public int evalXPath() throws XPathEvalExceptionHuge, NavExceptionHuge
XPathEvalExceptionHuge
NavExceptionHuge
public boolean evalXPathToBoolean()
public double evalXPathToNumber()
public java.lang.String evalXPathToString()
public java.lang.String getExprString()
public boolean iterate() throws PilotExceptionHuge, NavExceptionHuge
NavExceptionHuge
- See description in method toElement() in VTDNavHuge class.PilotExceptionHuge
public void resetXPath()
public void selectElement(java.lang.String en)
en
- java.lang.Stringpublic void selectElementNS(java.lang.String ns_URL, java.lang.String ln)
ns_URL
- Stringln
- Stringpublic void selectXPath(java.lang.String s) throws XPathParseExceptionHuge
s
- XPathParseException
XPathParseExceptionHuge