C# Класс com.ximpleware.AutoPilot

XimpleWare's AutoPilot implementation encapsulating node iterator and XPath.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

AutoPilot() публичный Метод

Use this constructor for delayed binding to VTDNav which allows the reuse of XPath expression
public AutoPilot ( ) : System
Результат System

AutoPilot() публичный Метод

AutoPilot constructor comment.
If the VTDNav object is null ///
public AutoPilot ( VTDNav v ) : System
v VTDNav
Результат System

bind() публичный Метод

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 * ///
Результат void

checkNsUniqueness() защищенный Метод

protected checkNsUniqueness ( int i ) : bool
i int
Результат bool

clearVariableExprs() публичный Метод

Remove all namespaces bindings
public clearVariableExprs ( ) : void
Результат void

clearXPathNameSpaces() публичный Метод

Remove all namespace bindings
public clearXPathNameSpaces ( ) : void
Результат void

declareVariableExpr() публичный Метод

declare variable references
public declareVariableExpr ( String varName, String varExpr ) : void
varName String
varExpr String
Результат void

declareXPathNameSpace() публичный Метод

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
Результат void

enableCaching() публичный Метод

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
Результат void

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
public evalXPath ( ) : int
Результат int

evalXPathToBoolean() публичный Метод

evalXPathToBoolean() evaluates the xpath expression to a boolean
public evalXPathToBoolean ( ) : bool
Результат bool

evalXPathToNumber() публичный Метод

evalXPathToNumber() evaluates the xpath expression to a double
public evalXPathToNumber ( ) : double
Результат double

evalXPathToString() публичный Метод

evalXPathToString() evaluates the xpath expression to a String
public evalXPathToString ( ) : String
Результат String

getExprString() публичный Метод

Convert the expression to a string For debugging purpose
public getExprString ( ) : System.String
Результат System.String

getNav() публичный Метод

public getNav ( ) : VTDNav
Результат VTDNav

iterate() публичный Метод

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
Результат bool

iterate2() публичный Метод

public iterate2 ( ) : bool
Результат bool

iterateAttr() публичный Метод

This method implements the attribute axis for XPath
public iterateAttr ( ) : int
Результат int

iterateAttr2() защищенный Метод

This method implements the attribute axis for XPath
protected iterateAttr2 ( ) : int
Результат int

iterateNameSpace() защищенный Метод

protected iterateNameSpace ( ) : int
Результат int

resetXPath() публичный Метод

Reset the XPath so the XPath Expression can be reused and revaluated in anther context position
public resetXPath ( ) : void
Результат void

selectAttr() публичный Метод

Select an attribute name for iteration, * choose all attributes of an element
public selectAttr ( System en ) : void
en System ///
Результат void

selectAttrNS() публичный Метод

Select an attribute name, both local part and namespace URL part
public selectAttrNS ( System ns_URL, System ln ) : void
ns_URL System ///
ln System ///
Результат void

selectDescendantNode() защищенный Метод

protected selectDescendantNode ( ) : void
Результат void

selectElement() публичный Метод

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 ///
Результат void

selectElementNS() публичный Метод

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 ///
Результат void

selectElementNS_D() защищенный Метод

Select all descendent elements along the Descendent axis, withns awareness
protected selectElementNS_D ( System ns_URL, System ln ) : void
ns_URL System ///
ln System ///
Результат void

selectElementNS_F() защищенный Метод

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
Результат void

selectElementNS_P() защищенный Метод

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 ///
Результат void

selectElement_D() защищенный Метод

Select all descendent elements along the descendent axis, without ns awareness
protected selectElement_D ( System en ) : void
en System ///
Результат void

selectElement_F() защищенный Метод

Select all elements along the following axis, without ns, null selects every elements and documents
protected selectElement_F ( System en ) : void
en System ///
Результат void

selectElement_P() защищенный Метод

Select all elements along the preceding axis as defined in XPath
protected selectElement_P ( System en ) : void
en System ///
Результат void

selectFollowingNode() защищенный Метод

protected selectFollowingNode ( ) : void
Результат void

selectNameSpace() защищенный Метод

protected selectNameSpace ( String en ) : void
en String
Результат void

selectNode() защищенный Метод

protected selectNode ( ) : void
Результат void

selectPrecedingNode() защищенный Метод

protected selectPrecedingNode ( ) : void
Результат void

selectXPath() публичный Метод

This method selects the string representing XPath expression Usually evalXPath is called afterwards
public selectXPath ( System s ) : void
s System ///
Результат void

Описание свойств

URL защищенное свойство

Store URL name after selectElementNS
protected String,System URL
Результат System.String

cachingEnabled защищенное свойство

true if caching is enabled for xpath evaluation
protected bool cachingEnabled
Результат bool

contextCopy защищенное свойство

for preceding axis
protected int[] contextCopy
Результат int[]

depth защищенное свойство

the depth of the element at the starting point will determine when to stop iteration
protected int depth
Результат int

endIndex защищенное свойство

protected int endIndex
Результат int

ft защищенное свойство

a helper variable for
protected bool ft
Результат bool

index защищенное свойство

for iterAttr
protected int index
Результат int

iter_type защищенное свойство

see selectElement
protected int iter_type
Результат int

localName защищенное свойство

Store local name after selectElemntNS
protected String,System localName
Результат System.String

name защищенное свойство

Store element name after selectElement
protected String,System name
Результат System.String

name2 защищенное свойство

xmlns:+name
protected String,System name2
Результат System.String

nsHash защищенное статическое свойство

hash table holding
protected static System.Collections.Hashtable nsHash
Результат System.Collections.Hashtable

size защищенное свойство

for iterateAttr
protected int size
Результат int

special защищенное свойство

This helps distinguish between
protected bool special
Результат bool

stackSize защищенное свойство

the stack size for xpath evaluation
protected int stackSize
Результат int

vn защищенное свойство

the navigator object
protected VTDNav vn
Результат VTDNav

xpe защищенное свойство

for evalXPath
protected Expr xpe
Результат Expr