C# Class com.ximpleware.AutoPilot

XimpleWare's AutoPilot implementation encapsulating node iterator and XPath.
Afficher le fichier Open project: jzhang2004/vtd-xml Class Usage Examples

Protected Properties

Свойство Type Description
URL System.String
cachingEnabled bool
contextCopy int[]
depth int
endIndex int
ft bool
index int
iter_type int
localName System.String
name System.String
name2 System.String
nsHash System.Collections.Hashtable
size int
special bool
stackSize int
vn VTDNav
xpe Expr

Méthodes publiques

Méthode Description
AutoPilot ( ) : System

Use this constructor for delayed binding to VTDNav which allows the reuse of XPath expression

AutoPilot ( VTDNav v ) : System

AutoPilot constructor comment.

bind ( VTDNav vnv ) : void

Bind is to replace rebind() and setVTDNav() It resets the internal state of AutoPilot so one can attach a VTDNav object to the autopilot

clearVariableExprs ( ) : void

Remove all namespaces bindings

clearXPathNameSpaces ( ) : void

Remove all namespace bindings

declareVariableExpr ( String varName, String varExpr ) : void

declare variable references

declareXPathNameSpace ( System prefix, System URL ) : void

This function creates URL ns prefix and is intended to be called prior to selectXPath

enableCaching ( bool state ) : void

set state to false to disable caching, which by default is enabled This method will turn on the internal caching feature during xpath evaluation, which is to store the evaluation results of absolute expressions when they resides in a predicate examples: //a[//bb=//cc] //bb and //cc are cached internally to avoid repeitive computation.. param state

evalXPath ( ) : int

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

evalXPathToBoolean ( ) : bool

evalXPathToBoolean() evaluates the xpath expression to a boolean

evalXPathToNumber ( ) : double

evalXPathToNumber() evaluates the xpath expression to a double

evalXPathToString ( ) : String

evalXPathToString() evaluates the xpath expression to a String

getExprString ( ) : System.String

Convert the expression to a string For debugging purpose

getNav ( ) : VTDNav
iterate ( ) : bool

Iterate over all the selected element nodes in document order. Null element name allowed, corresponding to node() in xpath Creation date: (12/4/03 5:25:42 PM)

iterate2 ( ) : bool
iterateAttr ( ) : int

This method implements the attribute axis for XPath

resetXPath ( ) : void

Reset the XPath so the XPath Expression can be reused and revaluated in anther context position

selectAttr ( System en ) : void

Select an attribute name for iteration, * choose all attributes of an element

selectAttrNS ( System ns_URL, System ln ) : void

Select an attribute name, both local part and namespace URL part

selectElement ( System en ) : void

Select the element name before iterating. "*" matches every element Creation date: (12/4/03 5:51:31 PM)

selectElementNS ( System ns_URL, System ln ) : void

Select the element name (name space version) before iterating. URL, if set to *, matches every namespace URL, if set to null, indicates the namespace is undefined. localname, if set to *, matches any localname Creation date: (12/4/03 6:05:19 PM)

selectXPath ( System s ) : void

This method selects the string representing XPath expression Usually evalXPath is called afterwards

Méthodes protégées

Méthode Description
checkNsUniqueness ( int i ) : bool
iterateAttr2 ( ) : int

This method implements the attribute axis for XPath

iterateNameSpace ( ) : int

selectDescendantNode ( ) : void

selectElementNS_D ( System ns_URL, System ln ) : void

Select all descendent elements along the Descendent axis, withns awareness

selectElementNS_F ( System ns_URL, System ln ) : void

Select all elements along the preceding axis as defined in XPath The namespace-aware version

selectElementNS_P ( System ns_URL, System ln ) : void

Select all elements along the preceding axis as defined in XPath This is the namespace aware version

selectElement_D ( System en ) : void

Select all descendent elements along the descendent axis, without ns awareness

selectElement_F ( System en ) : void

Select all elements along the following axis, without ns, null selects every elements and documents

selectElement_P ( System en ) : void

Select all elements along the preceding axis as defined in XPath

selectFollowingNode ( ) : void
selectNameSpace ( String en ) : void

selectNode ( ) : void
selectPrecedingNode ( ) : void

Method Details

AutoPilot() public méthode

Use this constructor for delayed binding to VTDNav which allows the reuse of XPath expression
public AutoPilot ( ) : System
Résultat System

AutoPilot() public méthode

AutoPilot constructor comment.
If the VTDNav object is null ///
public AutoPilot ( VTDNav v ) : System
v VTDNav
Résultat System

bind() public méthode

Bind is to replace rebind() and setVTDNav() It resets the internal state of AutoPilot so one can attach a VTDNav object to the autopilot
public bind ( VTDNav vnv ) : void
vnv VTDNav * ///
Résultat void

checkNsUniqueness() protected méthode

protected checkNsUniqueness ( int i ) : bool
i int
Résultat bool

clearVariableExprs() public méthode

Remove all namespaces bindings
public clearVariableExprs ( ) : void
Résultat void

clearXPathNameSpaces() public méthode

Remove all namespace bindings
public clearXPathNameSpaces ( ) : void
Résultat void

declareVariableExpr() public méthode

declare variable references
public declareVariableExpr ( String varName, String varExpr ) : void
varName String
varExpr String
Résultat void

declareXPathNameSpace() public méthode

This function creates URL ns prefix and is intended to be called prior to selectXPath
public declareXPathNameSpace ( System prefix, System URL ) : void
prefix System
URL System
Résultat void

enableCaching() public méthode

set state to false to disable caching, which by default is enabled This method will turn on the internal caching feature during xpath evaluation, which is to store the evaluation results of absolute expressions when they resides in a predicate examples: //a[//bb=//cc] //bb and //cc are cached internally to avoid repeitive computation.. param state
public enableCaching ( bool state ) : void
state bool
Résultat void

evalXPath() public méthode

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
public evalXPath ( ) : int
Résultat int

evalXPathToBoolean() public méthode

evalXPathToBoolean() evaluates the xpath expression to a boolean
public evalXPathToBoolean ( ) : bool
Résultat bool

evalXPathToNumber() public méthode

evalXPathToNumber() evaluates the xpath expression to a double
public evalXPathToNumber ( ) : double
Résultat double

evalXPathToString() public méthode

evalXPathToString() evaluates the xpath expression to a String
public evalXPathToString ( ) : String
Résultat String

getExprString() public méthode

Convert the expression to a string For debugging purpose
public getExprString ( ) : System.String
Résultat System.String

getNav() public méthode

public getNav ( ) : VTDNav
Résultat VTDNav

iterate() public méthode

Iterate over all the selected element nodes in document order. Null element name allowed, corresponding to node() in xpath Creation date: (12/4/03 5:25:42 PM)
See description in method toElement() in VTDNav class. ///
public iterate ( ) : bool
Résultat bool

iterate2() public méthode

public iterate2 ( ) : bool
Résultat bool

iterateAttr() public méthode

This method implements the attribute axis for XPath
public iterateAttr ( ) : int
Résultat int

iterateAttr2() protected méthode

This method implements the attribute axis for XPath
protected iterateAttr2 ( ) : int
Résultat int

iterateNameSpace() protected méthode

protected iterateNameSpace ( ) : int
Résultat int

resetXPath() public méthode

Reset the XPath so the XPath Expression can be reused and revaluated in anther context position
public resetXPath ( ) : void
Résultat void

selectAttr() public méthode

Select an attribute name for iteration, * choose all attributes of an element
public selectAttr ( System en ) : void
en System ///
Résultat void

selectAttrNS() public méthode

Select an attribute name, both local part and namespace URL part
public selectAttrNS ( System ns_URL, System ln ) : void
ns_URL System ///
ln System ///
Résultat void

selectDescendantNode() protected méthode

protected selectDescendantNode ( ) : void
Résultat void

selectElement() public méthode

Select the element name before iterating. "*" matches every element Creation date: (12/4/03 5:51:31 PM)
public selectElement ( System en ) : void
en System java.lang.String ///
Résultat void

selectElementNS() public méthode

Select the element name (name space version) before iterating. URL, if set to *, matches every namespace URL, if set to null, indicates the namespace is undefined. localname, if set to *, matches any localname Creation date: (12/4/03 6:05:19 PM)
public selectElementNS ( System ns_URL, System ln ) : void
ns_URL System
ln System java.lang.String ///
Résultat void

selectElementNS_D() protected méthode

Select all descendent elements along the Descendent axis, withns awareness
protected selectElementNS_D ( System ns_URL, System ln ) : void
ns_URL System ///
ln System ///
Résultat void

selectElementNS_F() protected méthode

Select all elements along the preceding axis as defined in XPath The namespace-aware version
protected selectElementNS_F ( System ns_URL, System ln ) : void
ns_URL System
ln System
Résultat void

selectElementNS_P() protected méthode

Select all elements along the preceding axis as defined in XPath This is the namespace aware version
protected selectElementNS_P ( System ns_URL, System ln ) : void
ns_URL System ///
ln System ///
Résultat void

selectElement_D() protected méthode

Select all descendent elements along the descendent axis, without ns awareness
protected selectElement_D ( System en ) : void
en System ///
Résultat void

selectElement_F() protected méthode

Select all elements along the following axis, without ns, null selects every elements and documents
protected selectElement_F ( System en ) : void
en System ///
Résultat void

selectElement_P() protected méthode

Select all elements along the preceding axis as defined in XPath
protected selectElement_P ( System en ) : void
en System ///
Résultat void

selectFollowingNode() protected méthode

protected selectFollowingNode ( ) : void
Résultat void

selectNameSpace() protected méthode

protected selectNameSpace ( String en ) : void
en String
Résultat void

selectNode() protected méthode

protected selectNode ( ) : void
Résultat void

selectPrecedingNode() protected méthode

protected selectPrecedingNode ( ) : void
Résultat void

selectXPath() public méthode

This method selects the string representing XPath expression Usually evalXPath is called afterwards
public selectXPath ( System s ) : void
s System ///
Résultat void

Property Details

URL protected_oe property

Store URL name after selectElementNS
protected String,System URL
Résultat System.String

cachingEnabled protected_oe property

true if caching is enabled for xpath evaluation
protected bool cachingEnabled
Résultat bool

contextCopy protected_oe property

for preceding axis
protected int[] contextCopy
Résultat int[]

depth protected_oe property

the depth of the element at the starting point will determine when to stop iteration
protected int depth
Résultat int

endIndex protected_oe property

protected int endIndex
Résultat int

ft protected_oe property

a helper variable for
protected bool ft
Résultat bool

index protected_oe property

for iterAttr
protected int index
Résultat int

iter_type protected_oe property

see selectElement
protected int iter_type
Résultat int

localName protected_oe property

Store local name after selectElemntNS
protected String,System localName
Résultat System.String

name protected_oe property

Store element name after selectElement
protected String,System name
Résultat System.String

name2 protected_oe property

xmlns:+name
protected String,System name2
Résultat System.String

nsHash protected_oe static_oe property

hash table holding
protected static System.Collections.Hashtable nsHash
Résultat System.Collections.Hashtable

size protected_oe property

for iterateAttr
protected int size
Résultat int

special protected_oe property

This helps distinguish between
protected bool special
Résultat bool

stackSize protected_oe property

the stack size for xpath evaluation
protected int stackSize
Résultat int

vn protected_oe property

the navigator object
protected VTDNav vn
Résultat VTDNav

xpe protected_oe property

for evalXPath
protected Expr xpe
Résultat Expr