C# 클래스 com.ximpleware.VTDNav

VTD navigator class implementation
파일 보기 프로젝트 열기: jzhang2004/vtd-xml 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
LN int
URIName String
XMLDoc IByteBuffer
atTerminal bool
context int[]
contextStack com.ximpleware.ContextBuffer
contextStack2 com.ximpleware.ContextBuffer
count int
currentNode com.ximpleware.BookMark
docLen int
docOffset int
encoding int
fib com.ximpleware.FastIntBuffer
l1Buffer com.ximpleware.FastLongBuffer
l1index int
l2Buffer com.ximpleware.FastLongBuffer
l2index int
l2lower int
l2upper int
l3Buffer com.ximpleware.FastIntBuffer
l3index int
l3lower int
l3upper int
localName String
localNameIndex int
maxLCDepthPlusOne short
name String
nameIndex int
nestingLevel int
ns bool
rootIndex int
shallowDepth bool
stackTemp int[]
vtdBuffer FastLongBuffer
vtdSize int

공개 메소드들

메소드 설명
cloneNav ( ) : VTDNav

Duplicate the VTDNav instance with shared XML, VTD and LC buffers This method may be useful for parallel XPath evaluation The node Position is copied over.

compareRawTokenString ( int index, String s ) : int

New in 2.0 Compare the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets compared against This method has to take care of the underlying encoding conversion but it doesn't resolve entity reference in the underlying document The behavior is the same as calling toRawString on index, then compare to s

compareTokenString ( int index, String s ) : int

New in 2.0 Compare the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion as well as entity reference comparison

compareTokens ( int i1, VTDNav vn2, int i2 ) : int

New in 2.0 This method compares two VTD tokens of VTDNav objects The behavior of this method is like compare the strings corresponds to i1 and i2

contains ( int index, String s ) : bool

Test whether a given token contains s. notie that this function directly operates on the byte content of the token to avoid string creation

dumpContext ( ) : void

This method print out the current state info of the navigation object. It is for debugging purpose.

dumpElementFragmentNs ( String fileName ) : void

new in v2.12, dump the element fragment into a file of a given name

dumpFragment ( String fileName ) : void

New in v2.12 Dump an element fragment of xml into an XML file whose name is specified as fileName

dumpFragment ( System os ) : void

New in v2.12 Dump an element fragment of xml into an output stream

dumpFragment ( long l, String fileName ) : void
dumpFragment ( long l, System os ) : void

New in v2.12 Dump a fragement as specified by a long into an output stream

dumpState ( ) : void
dumpXML ( String fileName ) : void

Dump the XML text into a file with the given fileName

dumpXML ( System os ) : void

dump the XML text into a stream

duplicateNav ( ) : VTDNav

Duplicate the VTDNav instance with shared XML, VTD and LC buffers This method may be useful for parallel XPath evaluation The node Position is at root element

endsWith ( int index, String s ) : bool

Test the end of token content at index i matches the content of s, notice that this is to save the string allocation cost of using String's built-in endsWidth

expandWhiteSpaces ( long l ) : long

New in v2.12 This method will take a segment descriptor and return a new descriptor that includes all the leading and trailing white spaces around the input segment It has no effect on CDATA A typical usage would be 'expandWhiteSpaces(getElementFragment())'

fillXPathString ( com.ximpleware.FastIntBuffer indexBuffer, com.ximpleware.FastIntBuffer countBuffer ) : void

getAttrCount ( ) : int

Get the number of attributes of a cursor element

getAttrVal ( System an ) : int

Get the token index of the attribute value given an attribute name.

getAttrValNS ( System URL, System ln ) : int

Get the token index of the attribute value of given URL and local name. If ns is not enabled, the lookup will return -1, indicating a no-found. Also namespace nodes are invisible using this method. One can't use * to indicate any name space because * is ambiguous!!

getContentFragment ( ) : long

Get content fragment returns a long encoding the offset and length of the byte segment of the content of current element, which is the byte segment between the starting tag and ending tag, -1 is returned if the current element is an empty element

getCurrentDepth ( ) : int

get the depth of context node

getCurrentIndex ( ) : int

Get the index value of the current element. Creation date: (11/16/03 6:40:25 PM)

getElementFragment ( ) : long

Get the starting offset and length of an element encoded in a long, upper 32 bit is length; lower 32 bit is offset Unit is in byte. Creation date: (3/15/04 1:47:55 PM)

getElementFragmentNs ( ) : com.ximpleware.ElementFragmentNs

getEncoding ( ) : int

Get the encoding of the XML document.

getIndexSize ( ) : long

Precompute the size of VTD+XML index without actully generating it

getNestingLevel ( ) : int

Get the maximum nesting depth of the XML document (>0). max depth is nestingLevel -1

getNormalizedStringLength ( int index ) : int

Get the string length of a token as if it is converted into a normalized UCS string

getOffsetAfterHead ( ) : long

getPrefixString ( int i ) : String

Return the prefix of a token as a string if the token is of the type of starting tag, attribute name, if the the prefix doesn't exist, a null string is returned; otherwise a null string is returned

getRawStringLength ( int index ) : int

Get the string length as if the token is converted into a UCS string (entity not resolved)

getRootIndex ( ) : int

Get root index value , which is the index val of document element

getSiblingElementFragments ( int i ) : long

Return the byte offset and length of up to i sibling fragments. If there is a i+1 sibling element, the cursor element would move to it; otherwise, there is no cursor movement. If the cursor isn't positioned at an element (due to XPath evaluation), then -1 will be returned @param i number of silbing elements including the cursor element @return a long encoding byte offset (bit 31 to bit 0), length (bit 62 to bit 32) of those fragments @throws NavException

getStringLength ( int index ) : int

getStringLength return the string length of a token as if the token is converted into a string (entity resolved)

getText ( ) : int

This method returns of the token index of the type character data or CDATA. Notice that it is intended to support data orient XML (not mixed-content XML). return the index of the text token, or -1 if none exists.

getTokenCount ( ) : int

Get total number of VTD tokens for the current XML document.

getTokenDepth ( int index ) : int

Get the depth value of a token (>=0).

getTokenLength ( int index ) : int

Get the token length at the given index value please refer to VTD spec for more details Length is in terms of the UTF char unit For prefixed tokens, it is the qualified name length. When ns is not enabled, return the full name length for attribute name and element name When ns is enabled, return an int with upper 16 bit for prefix length, lower 16 bit for qname length

getTokenOffset ( int index ) : int

Get the starting offset of the token at the given index.

getTokenType ( int index ) : int

Get the token type of the token at the given index value. Creation date: (11/16/03 6:41:51 PM)

getXML ( ) : IByteBuffer

Get the XML document

getXPathStringVal ( short mode ) : String
hasAttr ( System an ) : bool

Test whether current element has an attribute with the matching name. "*" will match any attribute name, therefore is a test whether there is any attribute at all if namespace is disabled, this function will not distinguish between ns declaration and attribute otherwise, ns tokens are invisible Creation date: (11/16/03 5:50:26 PM)

hasAttrNS ( System URL, System ln ) : bool

Test whether the current element has an attribute with matching namespace URL and localname. If ns is false, return false immediately

matchElement ( System en ) : bool

Test if the current element matches the given name. Creation date: (11/26/03 2:09:43 PM)

matchElementNS ( System URL, System ln ) : bool

Test whether the current element matches the given namespace URL and localname. URL, when set to "*", matches any namespace (including null), when set to null, defines a "always-no-match" ln is the localname that, when set to *, matches any localname

matchRawTokenString ( int index, System s ) : bool

Match the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion but it doesn't resolve entity reference in the underlying document

matchTokenString ( int index, System s ) : bool

Match the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion as well as entity reference comparison

matchTokens ( int i1, VTDNav vn2, int i2 ) : bool

This method compares two VTD tokens of VTDNav objects

overWrite ( int index, byte ba ) : bool

overWrite is introduced in version 2.0 that allows you to directly overwrite the XML content if the token is long enough If the operation is successful, white spaces will be used to fill the available token space, and there will be no need to regenerate the VTD and LCs The current version (2.0) only allows overwrites on attribute value, character data, and CDATA Consider the XML below: good After overwriting the token "good" with "bad," the new XML looks like: bad as you can see, "goo" is replaced with "bad" character-by-character, and the remaining "d" is replace with a white space

overWrite ( int index, byte ba, int offset, int len ) : bool

overWrite is introduced in version 2.0 that allows you to directly overwrite the XML content if the token is long enough If the operation is successful, white spaces will be used to fill the available token space, and there will be no need to regenerate the VTD and LCs The current version (2.0) only allows overwrites on attribute value, character data, and CDATA Consider the XML below: good After overwriting the token "good" with "bad," the new XML looks like: bad as you can see, "goo" is replaced with "bad" character-by-character, and the remaining "d" is replace with a white space

parseDouble ( int index ) : double

Convert a vtd token into a double. Creation date: (12/8/03 2:28:31 PM)

parseFloat ( int index ) : float

Convert a vtd token into a float. we assume token type to be attr val or character data Creation date: (12/8/03 2:28:18 PM)

parseInt ( int index ) : int

Convert a vtd token into an int. This method will automatically strip off the leading and trailing we assume token type to be attr val or character data zero, unlike Integer.parseInt(int index) Creation date: (12/8/03 2:32:22 PM)

parseLong ( int index ) : long

Convert a vtd token into a long. we assume token type to be attr val or character data Creation date: (12/8/03 2:32:59 PM)

pop ( ) : bool

Load the context info from ContextBuffer. Info saved including LC and current state of the context Creation date: (11/16/03 6:59:20 PM)

printL2Buffer ( ) : void

Insert the method's description here. Creation date: (3/11/04 1:46:06 PM)

printLC ( ) : void

printLC for debugging purpose. Creation date: (3/12/04 6:07:40 PM)

push ( ) : void

Store the context info into the ContextBuffer. Info saved including LC and current state of the context Creation date: (11/16/03 7:00:27 PM)

recoverNode ( int index ) : void

This method takes a vtd index, and recover its correspondin node position, the index can only be of node type element, document, attribute name, attribute value or character data, or CDATA

sampleState ( com.ximpleware.FastIntBuffer fib ) : void

This is for debugging purpose

startsWith ( int index, String s ) : bool

Test the start of token content at index i matches the content of s, notice that this is to save the string allocation cost of using String's built-in startsWidth

swap_bytes ( int i ) : int
toElement ( int direction ) : bool

A generic navigation method. Move the current to the element according to the direction constants If no such element, no position change and return false. Creation date: (12/2/03 1:43:50 PM) Legal direction constants are

   			ROOT               0 
 		    PARENT  		   1 
       	    FIRST_CHILD		   2 
 		    LAST_CHILD 		   3 
    	  	    NEXT_SIBLING       4 
      	    PREV_SIBLING       5 

toElement ( int direction, System en ) : bool

A generic navigation method. Move the current to the element according to the direction constants and the element name If no such element, no position change and return false. "*" matches any element Creation date: (12/2/03 1:43:50 PM) Legal direction constants are

		ROOT            0  
		PARENT          1  
		FIRST_CHILD     2  
		LAST_CHILD      3  
		NEXT_SIBLING    4  
		PREV_SIBLING    5  


for ROOT and PARENT, element name will be ignored.

toElementNS ( int direction, System URL, System ln ) : bool

A generic navigation method with namespace support. Move the current to the element according to the direction constants and the prefix and local names If no such element, no position change and return false. URL * matches any namespace, including undefined namespaces a null URL means hte namespace prefix is undefined for the element ln * matches any localname Creation date: (12/2/03 1:43:50 PM) Legal direction constants are

		ROOT            0  
		PARENT          1  
		FIRST_CHILD     2  
		LAST_CHILD      3  
		NEXT_SIBLING    4  
		PREV_SIBLING    5  


for ROOT and PARENT, element name will be ignored. If not ns enabled, return false immediately with no position change.

toNormalizedString ( int index ) : System.String

This method normalizes a token into a string in a way that resembles DOM. The leading and trailing white space characters will be stripped. The entity and character references will be resolved Multiple whitespaces char will be collapsed into one. Whitespaces via entities will nonetheless be preserved. Creation date: (12/8/03 1:57:10 PM)

toNormalizedString2 ( int index ) : String

(New since version 2.9) Shallow Normalization follows the rules below to normalize a token into a string *#xD#xA gets converted to #xA *For a character reference, append the referenced character to the normalized value. *For an entity reference, recursively apply step 3 of this algorithm to the replacement text of the entity. *For a white space character (#x20, #xD, #xA, #x9), append a space character (#x20) to the normalized value. *For another character, append the character to the normalized value. @param index @return @throws NavException

toNormalizedXPathString ( int j ) : String
toRawString ( int index ) : System.String

Convert a token at the given index to a String, (built-in entity and char references not resolved) (entities and char references not expanded). Creation date: (11/16/03 7:28:49 PM)

toRawString ( int os, int len ) : System.String

Convert a segment of xml document into string entities not resolved

toRawStringLowerCase ( int index ) : String

Convert a token at the given index to a String, upper case chars get converted into lower case (entities and char references not expanded).

toRawStringUpperCase ( int index ) : String

Convert a token at the given index to a String, lower case chars get converted into upper case (entities and char references not expanded).

toString ( int index ) : System.String

Convert a token at the given index to a String, (entities and char references resolved). An attribute name or an element name will get the UCS2 string of qualified name Creation date: (11/16/03 7:27:19 PM)

toString ( int os, int len ) : System.String

convert the document segment to String, entities resolved

toStringLowerCase ( int index ) : String

Convert a token at the given index to a String and any upper case character will be converted to lower case, (entities and char references resolved). An attribute name or an element name will get the UCS2 string of qualified name

toStringUpperCase ( int index ) : String

Convert a token at the given index to a String and any lower case character will be converted to upper case, (entities and char references resolved). An attribute name or an element name will get the UCS2 string of qualified name

trimWhiteSpaces ( long l ) : long

New in v2.12 This method will take a segment descriptor and return a new descriptor that removes all the leading and trailing white spaces around the input segment It has no effect on CDATA

verifyNodeCorrectness ( ) : bool
writeIndex ( System os ) : void

This method writes the VTD+XML into an output streams

writeSeparateIndex ( String fileName ) : void

Write VTDNav's internal structure into an OutputStream (XML not written out)

writeSeparateIndex ( System os ) : void

Write VTDNav's VTD and LCs into an OutputStream (XML not written out)

보호된 메소드들

메소드 설명
VTDNav ( ) : System

Return the attribute count of the element at the cursor position. when ns is false, ns tokens are considered attributes; otherwise, ns tokens are not considered attributes

VTDNav ( int RootIndex, int enc, bool NS, int depth, IByteBuffer x, com.ximpleware.FastLongBuffer vtd, com.ximpleware.FastLongBuffer l1, com.ximpleware.FastLongBuffer l2, com.ximpleware.FastIntBuffer l3, int so, int length ) : System

Initialize the VTD navigation object.

XPathStringLength ( int j ) : int
XPathStringVal2Double ( int j ) : double

Convert the string val of an element of document node into a double without first creating teh string object

XPathStringVal_Contains ( int j, String s ) : bool
XPathStringVal_EndsWith ( int j, String s ) : bool

This method is called by ends-with in FuncExpression, it is to perform ends-with on concatnation of text value of an element or document without actually creating the string object.

XPathStringVal_Matches ( int j, String s ) : bool

XPathStringVal_Matches ( int j, VTDNav vn2, int k ) : int

XPathStringVal_StartsWith ( int j, String s ) : bool

clearStack2 ( ) : void

clear the contextStack2 after XPath evaluation

compareNormalizedTokenString2 ( int offset, int len, String s ) : int

compareNormalizedTokenString2

compareRawTokenString ( int offset, int len, String s ) : int

compareTokenString ( int offset, int len, String s ) : int

getCurrentIndex2 ( ) : int
getNextChar ( VTDNav vn, helper h ) : int
getOffsetBeforeTail ( ) : long
getTokenLength2 ( int index ) : int
getXPathStringVal ( ) : String
getXPathStringVal2 ( int j, short mode ) : String
isElement ( int index ) : bool

Test the token type, to see if it is a starting tag.

isElementOrDocument ( int index ) : bool

Test the token type, to see if it is a starting tag or document token (introduced in 1.0).

iterate ( int dp, System en, bool special ) : bool

This method is similar to getElementByName in DOM except it doesn't return the nodeset, instead it iterates over those nodes. Notice that this method is called by the "iterate" method in the Autopilot class. "*" will match any element Creation date: (12/2/03 2:31:20 PM)

iterateNS ( int dp, System URL, System ln ) : bool

This method is similar to getElementByName in DOM except it doesn't return the nodeset, instead it iterates over those nodes . When URL is "*" it will match any namespace if ns is false, return false immediately

iterateNode ( int dp ) : bool
iterate_following ( System en, bool special ) : bool

This function is called by selectElement_F in autoPilot

iterate_followingNS ( System URL, System ln ) : bool

This function is called by selectElementNS_F in autoPilot

iterate_following_node ( ) : bool
iterate_preceding ( System en, int a, int endIndex ) : bool

This function is called by selectElement_P in autoPilot

iterate_precedingNS ( System URL, System ln, int a, int endIndex ) : bool

This function is called by selectElementNS_P in autoPilot

iterate_preceding_node ( int a, int endIndex ) : bool
loadCurrentNode ( ) : void
lookupNS ( ) : int

Test whether the URL is defined in the scope. Null is allowed to indicate the name space is undefined. Creation date: (11/16/03 7:54:01 PM)

lookupNS ( int offset, int len ) : int

matchNormalizedTokenString2 ( int index, String s ) : bool

matchRawTokenString2 ( int index, String s ) : bool

nodeToElement ( int direction ) : bool
parseInt ( int index, int radix ) : int

Convert a vtd token into an int, with the given radix. we assume token type to be attr val or character data the first char can be either '+' or '-' Creation date: (12/16/03 1:21:20 PM)

parseLong ( int index, int radix ) : long

Convert a vtd token into a long, with the given radix. the first char can be either '+' or '-', leading and trailing will be stripped we assume token type to be attr val or character data Creation date: (12/17/03 1:51:06 PM)

pop2 ( ) : bool

Load the context info from contextStack2. This method is dedicated for XPath evaluation.

push2 ( ) : void

Store the context info into the contextStack2. This method is reserved for XPath Evaluation

recoverNode_l1 ( int index ) : void

recoverNode_l2 ( int index ) : void

recoverNode_l3 ( int index ) : void

resolveLC ( ) : void

Sync up the current context with location cache. This operation includes finding out l1index, l2index, l3index and restores upper and lower bound info To improve efficieny this method employs some heuristic search algorithm. The result is that it is quite close to direct access. Creation date: (11/16/03 7:44:53 PM)

resolveLC_l1 ( ) : void
resolveLC_l2 ( ) : void
resolveLC_l3 ( ) : void
sync ( int depth, int index ) : void
toNode ( int dir ) : bool
toNode_LastChild ( ) : bool
toNode_PrevSibling ( ) : bool
toRawString ( int os, int len, System sb ) : void
toRawStringLowerCase ( int os, int len ) : String

toRawStringLowerCase ( int os, int len, StringBuilder sb ) : void
toRawStringUpperCase ( int os, int len ) : String

toRawStringUpperCase ( int os, int len, StringBuilder sb ) : void
toString ( System sb, int index ) : void

toString ( int os, int len, System sb ) : void
toStringLowerCase ( int os, int len ) : String

Convert the byte content segment (in terms of offset and length) to String, upper case characters are converted to lower case Notice this is more efficient than call toString, then can toLowerCase

toStringLowerCase ( StringBuilder sb, int index ) : void
toStringLowerCase ( int os, int len, StringBuilder sb ) : void
toStringUpperCase ( int os, int len ) : String

Convert the byte content segment (in terms of offset and length) to String, lower case characters are converted to upper case

toStringUpperCase ( StringBuilder sb, int index ) : void
toStringUpperCase ( int os, int len, StringBuilder sb ) : void

비공개 메소드들

메소드 설명
NSval ( int i ) : int

Evaluate the namespace indicator in bit 31 and bit 30. Creation date: (11/27/03 5:38:51 PM)

decode ( int offset ) : int
getChar ( int offset ) : long

This method decodes the underlying byte array into corresponding UCS2 char representation . It doesn't resolves built-in entity and character references. Length will never be zero Creation date: (11/21/03 6:26:17 PM)

getChar4OtherEncoding ( int offset ) : long
getCharResolved ( int offset ) : long

This method decodes the underlying byte array into corresponding UCS2 char representation . Also it resolves built-in entity and character references.

getCharUnit ( int offset ) : int

Get the next char unit which gets decoded automatically

handle_utf16be ( int offset ) : long
handle_utf16le ( int offset ) : long
handle_utf8 ( long temp, int offset ) : long
isDigit ( int c ) : bool
isWS ( int ch ) : bool

Test whether ch is a white space character or not.

matchRawTokenString ( int offset, int len, System s ) : bool

Match a string against a token with given offset and len, entities doesn't get resolved.

matchRawTokenString ( long l, System s ) : bool

Match a string with a token represented by a long (upper 32 len, lower 32 offset).

matchSubString ( int os, int index, String s ) : bool
matchSubString2 ( int os, int index, String s ) : bool
matchTokenString ( int offset, int len, System s ) : bool

Match a string against a token with given offset and len, entities get resolved properly. Creation date: (11/24/03 1:37:42 PM)

matchTokenString ( long l, System s ) : bool

Match a string against a "non-extractive" token represented by a long (upper 32 len, lower 32 offset).

resolveNS ( System URL, int offset, int len ) : bool

Test whether the URL is defined in the document. Null is allowed to indicate the name space should be undefined. Creation date: (11/16/03 7:54:01 PM)

메소드 상세

VTDNav() 보호된 메소드

Return the attribute count of the element at the cursor position. when ns is false, ns tokens are considered attributes; otherwise, ns tokens are not considered attributes
protected VTDNav ( ) : System
리턴 System

VTDNav() 보호된 메소드

Initialize the VTD navigation object.
protected VTDNav ( int RootIndex, int enc, bool NS, int depth, IByteBuffer x, com.ximpleware.FastLongBuffer vtd, com.ximpleware.FastLongBuffer l1, com.ximpleware.FastLongBuffer l2, com.ximpleware.FastIntBuffer l3, int so, int length ) : System
RootIndex int int ///
enc int
NS bool boolean ///
depth int
x IByteBuffer byte[] ///
vtd com.ximpleware.FastLongBuffer com.ximpleware.ILongBuffer ///
l1 com.ximpleware.FastLongBuffer com.ximpleware.ILongBuffer ///
l2 com.ximpleware.FastLongBuffer com.ximpleware.ILongBuffer ///
l3 com.ximpleware.FastIntBuffer com.ximpleware.IIntBuffer ///
so int int starting offset of the document(in byte) ///
length int int length of the document (in byte) ///
리턴 System

XPathStringLength() 보호된 메소드

protected XPathStringLength ( int j ) : int
j int
리턴 int

XPathStringVal2Double() 보호된 메소드

Convert the string val of an element of document node into a double without first creating teh string object
protected XPathStringVal2Double ( int j ) : double
j int
리턴 double

XPathStringVal_Contains() 보호된 메소드

protected XPathStringVal_Contains ( int j, String s ) : bool
j int
s String
리턴 bool

XPathStringVal_EndsWith() 보호된 메소드

This method is called by ends-with in FuncExpression, it is to perform ends-with on concatnation of text value of an element or document without actually creating the string object.
protected XPathStringVal_EndsWith ( int j, String s ) : bool
j int
s String
리턴 bool

XPathStringVal_Matches() 보호된 메소드

protected XPathStringVal_Matches ( int j, String s ) : bool
j int
s String
리턴 bool

XPathStringVal_Matches() 보호된 메소드

protected XPathStringVal_Matches ( int j, VTDNav vn2, int k ) : int
j int
vn2 VTDNav
k int
리턴 int

XPathStringVal_StartsWith() 보호된 메소드

protected XPathStringVal_StartsWith ( int j, String s ) : bool
j int
s String
리턴 bool

clearStack2() 보호된 메소드

clear the contextStack2 after XPath evaluation
protected clearStack2 ( ) : void
리턴 void

cloneNav() 공개 메소드

Duplicate the VTDNav instance with shared XML, VTD and LC buffers This method may be useful for parallel XPath evaluation The node Position is copied over.
public cloneNav ( ) : VTDNav
리턴 VTDNav

compareNormalizedTokenString2() 보호된 메소드

compareNormalizedTokenString2
protected compareNormalizedTokenString2 ( int offset, int len, String s ) : int
offset int
len int
s String
리턴 int

compareRawTokenString() 공개 메소드

New in 2.0 Compare the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets compared against This method has to take care of the underlying encoding conversion but it doesn't resolve entity reference in the underlying document The behavior is the same as calling toRawString on index, then compare to s
public compareRawTokenString ( int index, String s ) : int
index int
s String
리턴 int

compareRawTokenString() 보호된 메소드

protected compareRawTokenString ( int offset, int len, String s ) : int
offset int
len int
s String
리턴 int

compareTokenString() 공개 메소드

New in 2.0 Compare the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion as well as entity reference comparison
public compareTokenString ( int index, String s ) : int
index int
s String
리턴 int

compareTokenString() 보호된 메소드

protected compareTokenString ( int offset, int len, String s ) : int
offset int
len int
s String
리턴 int

compareTokens() 공개 메소드

New in 2.0 This method compares two VTD tokens of VTDNav objects The behavior of this method is like compare the strings corresponds to i1 and i2
public compareTokens ( int i1, VTDNav vn2, int i2 ) : int
i1 int
vn2 VTDNav
i2 int
리턴 int

contains() 공개 메소드

Test whether a given token contains s. notie that this function directly operates on the byte content of the token to avoid string creation
public contains ( int index, String s ) : bool
index int
s String
리턴 bool

dumpContext() 공개 메소드

This method print out the current state info of the navigation object. It is for debugging purpose.
public dumpContext ( ) : void
리턴 void

dumpElementFragmentNs() 공개 메소드

new in v2.12, dump the element fragment into a file of a given name
public dumpElementFragmentNs ( String fileName ) : void
fileName String
리턴 void

dumpFragment() 공개 메소드

New in v2.12 Dump an element fragment of xml into an XML file whose name is specified as fileName
public dumpFragment ( String fileName ) : void
fileName String
리턴 void

dumpFragment() 공개 메소드

New in v2.12 Dump an element fragment of xml into an output stream
public dumpFragment ( System os ) : void
os System
리턴 void

dumpFragment() 공개 메소드

public dumpFragment ( long l, String fileName ) : void
l long
fileName String
리턴 void

dumpFragment() 공개 메소드

New in v2.12 Dump a fragement as specified by a long into an output stream
public dumpFragment ( long l, System os ) : void
l long
os System
리턴 void

dumpState() 공개 메소드

public dumpState ( ) : void
리턴 void

dumpXML() 공개 메소드

Dump the XML text into a file with the given fileName
public dumpXML ( String fileName ) : void
fileName String
리턴 void

dumpXML() 공개 메소드

dump the XML text into a stream
public dumpXML ( System os ) : void
os System output stream
리턴 void

duplicateNav() 공개 메소드

Duplicate the VTDNav instance with shared XML, VTD and LC buffers This method may be useful for parallel XPath evaluation The node Position is at root element
public duplicateNav ( ) : VTDNav
리턴 VTDNav

endsWith() 공개 메소드

Test the end of token content at index i matches the content of s, notice that this is to save the string allocation cost of using String's built-in endsWidth
public endsWith ( int index, String s ) : bool
index int
s String
리턴 bool

expandWhiteSpaces() 공개 메소드

New in v2.12 This method will take a segment descriptor and return a new descriptor that includes all the leading and trailing white spaces around the input segment It has no effect on CDATA A typical usage would be 'expandWhiteSpaces(getElementFragment())'
public expandWhiteSpaces ( long l ) : long
l long
리턴 long

fillXPathString() 공개 메소드

public fillXPathString ( com.ximpleware.FastIntBuffer indexBuffer, com.ximpleware.FastIntBuffer countBuffer ) : void
indexBuffer com.ximpleware.FastIntBuffer
countBuffer com.ximpleware.FastIntBuffer
리턴 void

getAttrCount() 공개 메소드

Get the number of attributes of a cursor element
public getAttrCount ( ) : int
리턴 int

getAttrVal() 공개 메소드

Get the token index of the attribute value given an attribute name.
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD etc can be generated by another /// machine from a load-balancer. ///
public getAttrVal ( System an ) : int
an System String ///
리턴 int

getAttrValNS() 공개 메소드

Get the token index of the attribute value of given URL and local name. If ns is not enabled, the lookup will return -1, indicating a no-found. Also namespace nodes are invisible using this method. One can't use * to indicate any name space because * is ambiguous!!
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD etc can be generated by another /// machine from a load-balancer. ///
public getAttrValNS ( System URL, System ln ) : int
URL System String (Name space URL) ///
ln System String (local name) ///
리턴 int

getContentFragment() 공개 메소드

Get content fragment returns a long encoding the offset and length of the byte segment of the content of current element, which is the byte segment between the starting tag and ending tag, -1 is returned if the current element is an empty element
public getContentFragment ( ) : long
리턴 long

getCurrentDepth() 공개 메소드

get the depth of context node
public getCurrentDepth ( ) : int
리턴 int

getCurrentIndex() 공개 메소드

Get the index value of the current element. Creation date: (11/16/03 6:40:25 PM)
public getCurrentIndex ( ) : int
리턴 int

getCurrentIndex2() 보호된 메소드

protected getCurrentIndex2 ( ) : int
리턴 int

getElementFragment() 공개 메소드

Get the starting offset and length of an element encoded in a long, upper 32 bit is length; lower 32 bit is offset Unit is in byte. Creation date: (3/15/04 1:47:55 PM)
public getElementFragment ( ) : long
리턴 long

getElementFragmentNs() 공개 메소드

public getElementFragmentNs ( ) : com.ximpleware.ElementFragmentNs
리턴 com.ximpleware.ElementFragmentNs

getEncoding() 공개 메소드

Get the encoding of the XML document.
public getEncoding ( ) : int
리턴 int

getIndexSize() 공개 메소드

Precompute the size of VTD+XML index without actully generating it
public getIndexSize ( ) : long
리턴 long

getNestingLevel() 공개 메소드

Get the maximum nesting depth of the XML document (>0). max depth is nestingLevel -1
public getNestingLevel ( ) : int
리턴 int

getNextChar() 보호된 메소드

protected getNextChar ( VTDNav vn, helper h ) : int
vn VTDNav
h helper
리턴 int

getNormalizedStringLength() 공개 메소드

Get the string length of a token as if it is converted into a normalized UCS string
public getNormalizedStringLength ( int index ) : int
index int
리턴 int

getOffsetAfterHead() 공개 메소드

public getOffsetAfterHead ( ) : long
리턴 long

getOffsetBeforeTail() 보호된 메소드

protected getOffsetBeforeTail ( ) : long
리턴 long

getPrefixString() 공개 메소드

Return the prefix of a token as a string if the token is of the type of starting tag, attribute name, if the the prefix doesn't exist, a null string is returned; otherwise a null string is returned
public getPrefixString ( int i ) : String
i int VTD index of a token
리턴 String

getRawStringLength() 공개 메소드

Get the string length as if the token is converted into a UCS string (entity not resolved)
public getRawStringLength ( int index ) : int
index int
리턴 int

getRootIndex() 공개 메소드

Get root index value , which is the index val of document element
public getRootIndex ( ) : int
리턴 int

getSiblingElementFragments() 공개 메소드

Return the byte offset and length of up to i sibling fragments. If there is a i+1 sibling element, the cursor element would move to it; otherwise, there is no cursor movement. If the cursor isn't positioned at an element (due to XPath evaluation), then -1 will be returned @param i number of silbing elements including the cursor element @return a long encoding byte offset (bit 31 to bit 0), length (bit 62 to bit 32) of those fragments @throws NavException
public getSiblingElementFragments ( int i ) : long
i int
리턴 long

getStringLength() 공개 메소드

getStringLength return the string length of a token as if the token is converted into a string (entity resolved)
public getStringLength ( int index ) : int
index int
리턴 int

getText() 공개 메소드

This method returns of the token index of the type character data or CDATA. Notice that it is intended to support data orient XML (not mixed-content XML). return the index of the text token, or -1 if none exists.
public getText ( ) : int
리턴 int

getTokenCount() 공개 메소드

Get total number of VTD tokens for the current XML document.
public getTokenCount ( ) : int
리턴 int

getTokenDepth() 공개 메소드

Get the depth value of a token (>=0).
public getTokenDepth ( int index ) : int
index int int ///
리턴 int

getTokenLength() 공개 메소드

Get the token length at the given index value please refer to VTD spec for more details Length is in terms of the UTF char unit For prefixed tokens, it is the qualified name length. When ns is not enabled, return the full name length for attribute name and element name When ns is enabled, return an int with upper 16 bit for prefix length, lower 16 bit for qname length
public getTokenLength ( int index ) : int
index int int ///
리턴 int

getTokenLength2() 보호된 메소드

protected getTokenLength2 ( int index ) : int
index int
리턴 int

getTokenOffset() 공개 메소드

Get the starting offset of the token at the given index.
///
public getTokenOffset ( int index ) : int
index int int ///
리턴 int

getTokenType() 공개 메소드

Get the token type of the token at the given index value. Creation date: (11/16/03 6:41:51 PM)
///
public getTokenType ( int index ) : int
index int int ///
리턴 int

getXML() 공개 메소드

Get the XML document
public getXML ( ) : IByteBuffer
리턴 IByteBuffer

getXPathStringVal() 보호된 메소드

protected getXPathStringVal ( ) : String
리턴 String

getXPathStringVal() 공개 메소드

public getXPathStringVal ( short mode ) : String
mode short
리턴 String

getXPathStringVal2() 보호된 메소드

protected getXPathStringVal2 ( int j, short mode ) : String
j int
mode short
리턴 String

hasAttr() 공개 메소드

Test whether current element has an attribute with the matching name. "*" will match any attribute name, therefore is a test whether there is any attribute at all if namespace is disabled, this function will not distinguish between ns declaration and attribute otherwise, ns tokens are invisible Creation date: (11/16/03 5:50:26 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD etc can be generated by another /// machine from a load-balancer. ///
public hasAttr ( System an ) : bool
an System String ///
리턴 bool

hasAttrNS() 공개 메소드

Test whether the current element has an attribute with matching namespace URL and localname. If ns is false, return false immediately
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public hasAttrNS ( System URL, System ln ) : bool
URL System String (namespace URL) ///
ln System String (localname ) ///
리턴 bool

isElement() 보호된 메소드

Test the token type, to see if it is a starting tag.
protected isElement ( int index ) : bool
index int int ///
리턴 bool

isElementOrDocument() 보호된 메소드

Test the token type, to see if it is a starting tag or document token (introduced in 1.0).
protected isElementOrDocument ( int index ) : bool
index int int ///
리턴 bool

iterate() 보호된 메소드

This method is similar to getElementByName in DOM except it doesn't return the nodeset, instead it iterates over those nodes. Notice that this method is called by the "iterate" method in the Autopilot class. "*" will match any element Creation date: (12/2/03 2:31:20 PM)
The exception is signaled if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because VTD records can be generated by another /// machine from a load-balancer. /// null element name allowed represent node()in XPath; ///
protected iterate ( int dp, System en, bool special ) : bool
dp int int (The depth of the starting position before iterating) ///
en System String ///
special bool
리턴 bool

iterateNS() 보호된 메소드

This method is similar to getElementByName in DOM except it doesn't return the nodeset, instead it iterates over those nodes . When URL is "*" it will match any namespace if ns is false, return false immediately
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because VTD records can be generated by another /// machine from a load-balancer.. ///
protected iterateNS ( int dp, System URL, System ln ) : bool
dp int int (The depth of the starting position before iterating) ///
URL System String ///
ln System String ///
리턴 bool

iterateNode() 보호된 메소드

protected iterateNode ( int dp ) : bool
dp int
리턴 bool

iterate_following() 보호된 메소드

This function is called by selectElement_F in autoPilot
protected iterate_following ( System en, bool special ) : bool
en System ElementName ///
special bool whether it is a node() ///
리턴 bool

iterate_followingNS() 보호된 메소드

This function is called by selectElementNS_F in autoPilot
protected iterate_followingNS ( System URL, System ln ) : bool
URL System ///
ln System ///
리턴 bool

iterate_following_node() 보호된 메소드

protected iterate_following_node ( ) : bool
리턴 bool

iterate_preceding() 보호된 메소드

This function is called by selectElement_P in autoPilot
protected iterate_preceding ( System en, int a, int endIndex ) : bool
en System element Name ///
a int context of current position ///
endIndex int ///
리턴 bool

iterate_precedingNS() 보호된 메소드

This function is called by selectElementNS_P in autoPilot
protected iterate_precedingNS ( System URL, System ln, int a, int endIndex ) : bool
URL System ///
ln System ///
a int
endIndex int
리턴 bool

iterate_preceding_node() 보호된 메소드

protected iterate_preceding_node ( int a, int endIndex ) : bool
a int
endIndex int
리턴 bool

loadCurrentNode() 보호된 메소드

protected loadCurrentNode ( ) : void
리턴 void

lookupNS() 보호된 메소드

Test whether the URL is defined in the scope. Null is allowed to indicate the name space is undefined. Creation date: (11/16/03 7:54:01 PM)
When there is any encoding conversion error or unknown /// entity. ///
protected lookupNS ( ) : int
리턴 int

lookupNS() 보호된 메소드

protected lookupNS ( int offset, int len ) : int
offset int
len int
리턴 int

matchElement() 공개 메소드

Test if the current element matches the given name. Creation date: (11/26/03 2:09:43 PM)
If the underlying raw char representation has errors. /// if en is null ///
public matchElement ( System en ) : bool
en System String ///
리턴 bool

matchElementNS() 공개 메소드

Test whether the current element matches the given namespace URL and localname. URL, when set to "*", matches any namespace (including null), when set to null, defines a "always-no-match" ln is the localname that, when set to *, matches any localname
When there is any encoding conversion error or unknown entity. /// if ln == null ///
public matchElementNS ( System URL, System ln ) : bool
URL System String ///
ln System String ///
리턴 bool

matchNormalizedTokenString2() 보호된 메소드

protected matchNormalizedTokenString2 ( int index, String s ) : bool
index int
s String
리턴 bool

matchRawTokenString() 공개 메소드

Match the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion but it doesn't resolve entity reference in the underlying document
When if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public matchRawTokenString ( int index, System s ) : bool
index int int (index into the VTD token buffer) ///
s System String ///
리턴 bool

matchRawTokenString2() 보호된 메소드

protected matchRawTokenString2 ( int index, String s ) : bool
index int
s String
리턴 bool

matchTokenString() 공개 메소드

Match the string against the token at the given index value. When a token is an attribute name or starting tag, qualified name is what gets matched against This method has to take care of the underlying encoding conversion as well as entity reference comparison
When if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public matchTokenString ( int index, System s ) : bool
index int int ///
s System String ///
리턴 bool

matchTokens() 공개 메소드

This method compares two VTD tokens of VTDNav objects
public matchTokens ( int i1, VTDNav vn2, int i2 ) : bool
i1 int ///
vn2 VTDNav ///
i2 int ///
리턴 bool

nodeToElement() 보호된 메소드

protected nodeToElement ( int direction ) : bool
direction int
리턴 bool

overWrite() 공개 메소드

overWrite is introduced in version 2.0 that allows you to directly overwrite the XML content if the token is long enough If the operation is successful, white spaces will be used to fill the available token space, and there will be no need to regenerate the VTD and LCs The current version (2.0) only allows overwrites on attribute value, character data, and CDATA Consider the XML below: good After overwriting the token "good" with "bad," the new XML looks like: bad as you can see, "goo" is replaced with "bad" character-by-character, and the remaining "d" is replace with a white space
public overWrite ( int index, byte ba ) : bool
index int
ba byte
리턴 bool

overWrite() 공개 메소드

overWrite is introduced in version 2.0 that allows you to directly overwrite the XML content if the token is long enough If the operation is successful, white spaces will be used to fill the available token space, and there will be no need to regenerate the VTD and LCs The current version (2.0) only allows overwrites on attribute value, character data, and CDATA Consider the XML below: good After overwriting the token "good" with "bad," the new XML looks like: bad as you can see, "goo" is replaced with "bad" character-by-character, and the remaining "d" is replace with a white space
public overWrite ( int index, byte ba, int offset, int len ) : bool
index int
ba byte
offset int
len int
리턴 bool

parseDouble() 공개 메소드

Convert a vtd token into a double. Creation date: (12/8/03 2:28:31 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public parseDouble ( int index ) : double
index int
리턴 double

parseFloat() 공개 메소드

Convert a vtd token into a float. we assume token type to be attr val or character data Creation date: (12/8/03 2:28:18 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public parseFloat ( int index ) : float
index int
리턴 float

parseInt() 공개 메소드

Convert a vtd token into an int. This method will automatically strip off the leading and trailing we assume token type to be attr val or character data zero, unlike Integer.parseInt(int index) Creation date: (12/8/03 2:32:22 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public parseInt ( int index ) : int
index int int ///
리턴 int

parseInt() 보호된 메소드

Convert a vtd token into an int, with the given radix. we assume token type to be attr val or character data the first char can be either '+' or '-' Creation date: (12/16/03 1:21:20 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
protected parseInt ( int index, int radix ) : int
index int int ///
radix int int ///
리턴 int

parseLong() 공개 메소드

Convert a vtd token into a long. we assume token type to be attr val or character data Creation date: (12/8/03 2:32:59 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
public parseLong ( int index ) : long
index int int ///
리턴 long

parseLong() 보호된 메소드

Convert a vtd token into a long, with the given radix. the first char can be either '+' or '-', leading and trailing will be stripped we assume token type to be attr val or character data Creation date: (12/17/03 1:51:06 PM)
The exception if the underlying byte /// content contains various errors. Notice that we are being conservative in making little assumption on /// the correctness of underlying byte content. This is because the VTD can be generated by another /// machine such as a load-balancer. ///
protected parseLong ( int index, int radix ) : long
index int int ///
radix int int ///
리턴 long

pop() 공개 메소드

Load the context info from ContextBuffer. Info saved including LC and current state of the context Creation date: (11/16/03 6:59:20 PM)
public pop ( ) : bool
리턴 bool

pop2() 보호된 메소드

Load the context info from contextStack2. This method is dedicated for XPath evaluation.
protected pop2 ( ) : bool
리턴 bool

printL2Buffer() 공개 메소드

Insert the method's description here. Creation date: (3/11/04 1:46:06 PM)
public printL2Buffer ( ) : void
리턴 void

printLC() 공개 메소드

printLC for debugging purpose. Creation date: (3/12/04 6:07:40 PM)
public printLC ( ) : void
리턴 void

push() 공개 메소드

Store the context info into the ContextBuffer. Info saved including LC and current state of the context Creation date: (11/16/03 7:00:27 PM)
public push ( ) : void
리턴 void

push2() 보호된 메소드

Store the context info into the contextStack2. This method is reserved for XPath Evaluation
protected push2 ( ) : void
리턴 void

recoverNode() 공개 메소드

This method takes a vtd index, and recover its correspondin node position, the index can only be of node type element, document, attribute name, attribute value or character data, or CDATA
public recoverNode ( int index ) : void
index int
리턴 void

recoverNode_l1() 보호된 메소드

protected recoverNode_l1 ( int index ) : void
index int
리턴 void

recoverNode_l2() 보호된 메소드

protected recoverNode_l2 ( int index ) : void
index int
리턴 void

recoverNode_l3() 보호된 메소드

protected recoverNode_l3 ( int index ) : void
index int
리턴 void

resolveLC() 보호된 메소드

Sync up the current context with location cache. This operation includes finding out l1index, l2index, l3index and restores upper and lower bound info To improve efficieny this method employs some heuristic search algorithm. The result is that it is quite close to direct access. Creation date: (11/16/03 7:44:53 PM)
protected resolveLC ( ) : void
리턴 void

resolveLC_l1() 보호된 메소드

protected resolveLC_l1 ( ) : void
리턴 void

resolveLC_l2() 보호된 메소드

protected resolveLC_l2 ( ) : void
리턴 void

resolveLC_l3() 보호된 메소드

protected resolveLC_l3 ( ) : void
리턴 void

sampleState() 공개 메소드

This is for debugging purpose
public sampleState ( com.ximpleware.FastIntBuffer fib ) : void
fib com.ximpleware.FastIntBuffer ///
리턴 void

startsWith() 공개 메소드

Test the start of token content at index i matches the content of s, notice that this is to save the string allocation cost of using String's built-in startsWidth
public startsWith ( int index, String s ) : bool
index int
s String
리턴 bool

swap_bytes() 정적인 공개 메소드

static public swap_bytes ( int i ) : int
i int
리턴 int

sync() 보호된 메소드

protected sync ( int depth, int index ) : void
depth int
index int
리턴 void

toElement() 공개 메소드

A generic navigation method. Move the current to the element according to the direction constants If no such element, no position change and return false. Creation date: (12/2/03 1:43:50 PM) Legal direction constants are
   			ROOT               0 
 		    PARENT  		   1 
       	    FIRST_CHILD		   2 
 		    LAST_CHILD 		   3 
    	  	    NEXT_SIBLING       4 
      	    PREV_SIBLING       5 
When direction value is illegal. ///
public toElement ( int direction ) : bool
direction int int ///
리턴 bool

toElement() 공개 메소드

A generic navigation method. Move the current to the element according to the direction constants and the element name If no such element, no position change and return false. "*" matches any element Creation date: (12/2/03 1:43:50 PM) Legal direction constants are

		ROOT            0  
		PARENT          1  
		FIRST_CHILD     2  
		LAST_CHILD      3  
		NEXT_SIBLING    4  
		PREV_SIBLING    5  


for ROOT and PARENT, element name will be ignored.
When direction value is illegal. Or there are errors /// in underlying byte representation of the document /// if en is null ///
public toElement ( int direction, System en ) : bool
direction int int ///
en System String ///
리턴 bool

toElementNS() 공개 메소드

A generic navigation method with namespace support. Move the current to the element according to the direction constants and the prefix and local names If no such element, no position change and return false. URL * matches any namespace, including undefined namespaces a null URL means hte namespace prefix is undefined for the element ln * matches any localname Creation date: (12/2/03 1:43:50 PM) Legal direction constants are

		ROOT            0  
		PARENT          1  
		FIRST_CHILD     2  
		LAST_CHILD      3  
		NEXT_SIBLING    4  
		PREV_SIBLING    5  


for ROOT and PARENT, element name will be ignored. If not ns enabled, return false immediately with no position change.
When direction value is illegal. Or there are errors /// in underlying byte representation of the document ///
public toElementNS ( int direction, System URL, System ln ) : bool
direction int int ///
URL System namespace URL
ln System local name ///
리턴 bool

toNode() 보호된 메소드

protected toNode ( int dir ) : bool
dir int
리턴 bool

toNode_LastChild() 보호된 메소드

protected toNode_LastChild ( ) : bool
리턴 bool

toNode_PrevSibling() 보호된 메소드

protected toNode_PrevSibling ( ) : bool
리턴 bool

toNormalizedString() 공개 메소드

This method normalizes a token into a string in a way that resembles DOM. The leading and trailing white space characters will be stripped. The entity and character references will be resolved Multiple whitespaces char will be collapsed into one. Whitespaces via entities will nonetheless be preserved. Creation date: (12/8/03 1:57:10 PM)
When the encoding has errors ///
public toNormalizedString ( int index ) : System.String
index int int ///
리턴 System.String

toNormalizedString2() 공개 메소드

(New since version 2.9) Shallow Normalization follows the rules below to normalize a token into a string *#xD#xA gets converted to #xA *For a character reference, append the referenced character to the normalized value. *For an entity reference, recursively apply step 3 of this algorithm to the replacement text of the entity. *For a white space character (#x20, #xD, #xA, #x9), append a space character (#x20) to the normalized value. *For another character, append the character to the normalized value. @param index @return @throws NavException
public toNormalizedString2 ( int index ) : String
index int
리턴 String

toNormalizedXPathString() 공개 메소드

public toNormalizedXPathString ( int j ) : String
j int
리턴 String

toRawString() 공개 메소드

Convert a token at the given index to a String, (built-in entity and char references not resolved) (entities and char references not expanded). Creation date: (11/16/03 7:28:49 PM)
When the encoding has errors ///
public toRawString ( int index ) : System.String
index int int ///
리턴 System.String

toRawString() 공개 메소드

Convert a segment of xml document into string entities not resolved
public toRawString ( int os, int len ) : System.String
os int os in char
len int len in char
리턴 System.String

toRawString() 보호된 메소드

protected toRawString ( int os, int len, System sb ) : void
os int
len int
sb System
리턴 void

toRawStringLowerCase() 공개 메소드

Convert a token at the given index to a String, upper case chars get converted into lower case (entities and char references not expanded).
public toRawStringLowerCase ( int index ) : String
index int
리턴 String

toRawStringLowerCase() 보호된 메소드

protected toRawStringLowerCase ( int os, int len ) : String
os int
len int
리턴 String

toRawStringLowerCase() 보호된 메소드

protected toRawStringLowerCase ( int os, int len, StringBuilder sb ) : void
os int
len int
sb StringBuilder
리턴 void

toRawStringUpperCase() 공개 메소드

Convert a token at the given index to a String, lower case chars get converted into upper case (entities and char references not expanded).
public toRawStringUpperCase ( int index ) : String
index int VTD index
리턴 String

toRawStringUpperCase() 보호된 메소드

protected toRawStringUpperCase ( int os, int len ) : String
os int
len int
리턴 String

toRawStringUpperCase() 보호된 메소드

protected toRawStringUpperCase ( int os, int len, StringBuilder sb ) : void
os int
len int
sb StringBuilder
리턴 void

toString() 공개 메소드

Convert a token at the given index to a String, (entities and char references resolved). An attribute name or an element name will get the UCS2 string of qualified name Creation date: (11/16/03 7:27:19 PM)
///
public toString ( int index ) : System.String
index int
리턴 System.String

toString() 공개 메소드

convert the document segment to String, entities resolved
public toString ( int os, int len ) : System.String
os int offset in char
len int length in char
리턴 System.String

toString() 보호된 메소드

protected toString ( System sb, int index ) : void
sb System
index int
리턴 void

toString() 보호된 메소드

protected toString ( int os, int len, System sb ) : void
os int
len int
sb System
리턴 void

toStringLowerCase() 공개 메소드

Convert a token at the given index to a String and any upper case character will be converted to lower case, (entities and char references resolved). An attribute name or an element name will get the UCS2 string of qualified name
public toStringLowerCase ( int index ) : String
index int
리턴 String

toStringLowerCase() 보호된 메소드

Convert the byte content segment (in terms of offset and length) to String, upper case characters are converted to lower case Notice this is more efficient than call toString, then can toLowerCase
protected toStringLowerCase ( int os, int len ) : String
os int
len int
리턴 String

toStringLowerCase() 보호된 메소드

protected toStringLowerCase ( StringBuilder sb, int index ) : void
sb StringBuilder
index int
리턴 void

toStringLowerCase() 보호된 메소드

protected toStringLowerCase ( int os, int len, StringBuilder sb ) : void
os int
len int
sb StringBuilder
리턴 void

toStringUpperCase() 공개 메소드

Convert a token at the given index to a String and any lower case character will be converted to upper case, (entities and char references resolved). An attribute name or an element name will get the UCS2 string of qualified name
public toStringUpperCase ( int index ) : String
index int
리턴 String

toStringUpperCase() 보호된 메소드

Convert the byte content segment (in terms of offset and length) to String, lower case characters are converted to upper case
protected toStringUpperCase ( int os, int len ) : String
os int
len int
리턴 String

toStringUpperCase() 보호된 메소드

protected toStringUpperCase ( StringBuilder sb, int index ) : void
sb StringBuilder
index int
리턴 void

toStringUpperCase() 보호된 메소드

protected toStringUpperCase ( int os, int len, StringBuilder sb ) : void
os int
len int
sb StringBuilder
리턴 void

trimWhiteSpaces() 공개 메소드

New in v2.12 This method will take a segment descriptor and return a new descriptor that removes all the leading and trailing white spaces around the input segment It has no effect on CDATA
public trimWhiteSpaces ( long l ) : long
l long
리턴 long

verifyNodeCorrectness() 공개 메소드

public verifyNodeCorrectness ( ) : bool
리턴 bool

writeIndex() 공개 메소드

This method writes the VTD+XML into an output streams
public writeIndex ( System os ) : void
os System ///
리턴 void

writeSeparateIndex() 공개 메소드

Write VTDNav's internal structure into an OutputStream (XML not written out)
public writeSeparateIndex ( String fileName ) : void
fileName String
리턴 void

writeSeparateIndex() 공개 메소드

Write VTDNav's VTD and LCs into an OutputStream (XML not written out)
public writeSeparateIndex ( System os ) : void
os System
리턴 void

프로퍼티 상세

LN 보호되어 있는 프로퍼티

protected int LN
리턴 int

URIName 보호되어 있는 프로퍼티

protected String URIName
리턴 String

XMLDoc 보호되어 있는 프로퍼티

protected IByteBuffer XMLDoc
리턴 IByteBuffer

atTerminal 보호되어 있는 프로퍼티

protected bool atTerminal
리턴 bool

context 보호되어 있는 프로퍼티

protected int[] context
리턴 int[]

contextStack 보호되어 있는 프로퍼티

protected ContextBuffer,com.ximpleware contextStack
리턴 com.ximpleware.ContextBuffer

contextStack2 보호되어 있는 프로퍼티

protected ContextBuffer,com.ximpleware contextStack2
리턴 com.ximpleware.ContextBuffer

count 보호되어 있는 프로퍼티

protected int count
리턴 int

currentNode 보호되어 있는 프로퍼티

protected BookMark,com.ximpleware currentNode
리턴 com.ximpleware.BookMark

docLen 보호되어 있는 프로퍼티

protected int docLen
리턴 int

docOffset 보호되어 있는 프로퍼티

protected int docOffset
리턴 int

encoding 보호되어 있는 프로퍼티

protected int encoding
리턴 int

fib 보호되어 있는 프로퍼티

protected FastIntBuffer,com.ximpleware fib
리턴 com.ximpleware.FastIntBuffer

l1Buffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware l1Buffer
리턴 com.ximpleware.FastLongBuffer

l1index 보호되어 있는 프로퍼티

protected int l1index
리턴 int

l2Buffer 보호되어 있는 프로퍼티

protected FastLongBuffer,com.ximpleware l2Buffer
리턴 com.ximpleware.FastLongBuffer

l2index 보호되어 있는 프로퍼티

protected int l2index
리턴 int

l2lower 보호되어 있는 프로퍼티

protected int l2lower
리턴 int

l2upper 보호되어 있는 프로퍼티

protected int l2upper
리턴 int

l3Buffer 보호되어 있는 프로퍼티

protected FastIntBuffer,com.ximpleware l3Buffer
리턴 com.ximpleware.FastIntBuffer

l3index 보호되어 있는 프로퍼티

protected int l3index
리턴 int

l3lower 보호되어 있는 프로퍼티

protected int l3lower
리턴 int

l3upper 보호되어 있는 프로퍼티

protected int l3upper
리턴 int

localName 보호되어 있는 프로퍼티

protected String localName
리턴 String

localNameIndex 보호되어 있는 프로퍼티

protected int localNameIndex
리턴 int

maxLCDepthPlusOne 보호되어 있는 프로퍼티

protected short maxLCDepthPlusOne
리턴 short

name 보호되어 있는 프로퍼티

protected String name
리턴 String

nameIndex 보호되어 있는 프로퍼티

protected int nameIndex
리턴 int

nestingLevel 보호되어 있는 프로퍼티

protected int nestingLevel
리턴 int

ns 보호되어 있는 프로퍼티

protected bool ns
리턴 bool

rootIndex 보호되어 있는 프로퍼티

protected int rootIndex
리턴 int

shallowDepth 보호되어 있는 프로퍼티

protected bool shallowDepth
리턴 bool

stackTemp 보호되어 있는 프로퍼티

protected int[] stackTemp
리턴 int[]

vtdBuffer 보호되어 있는 프로퍼티

protected FastLongBuffer vtdBuffer
리턴 FastLongBuffer

vtdSize 보호되어 있는 프로퍼티

protected int vtdSize
리턴 int