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, meaning for text or attribute val, entities will be converted into
the corresponding char
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.
This method will first call getCurrentIndex() to get the cursor index value
then insert the transcoded array of bytes of a segment of the byte array b after the element
This method will first call getCurrentIndex() to get the cursor index value
then insert a segment of the byte array b after the element,
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
This method will first call getCurrentIndex() to get the cursor index value
then insert a segment of the byte array b (transcode into a byte array) after the element,
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
Insert an attribute after the starting tag
This method will first call getCurrentIndex() to get the cursor index value
if the index is of type "starting tag", then the attribute is inserted
after the starting tag
Insert a byte arry of an attribute after the starting tag
This method will first call getCurrentIndex() to get the cursor index value
if the index is of type "starting tag", then teh attribute is inserted
after the starting tag
Insert the transcoded representation of a byte arry of an attribute
after the starting tag This method will first call getCurrentIndex()
to get the cursor index value if the index is of type "starting tag",
then teh attribute is inserted after the starting tag
This method will first call getCurrentIndex() to get the cursor index value
then insert the transcoded representatin of the byte array b before the element
This method will first call getCurrentIndex() to get the cursor index value
then insert the transcoded representation of a segment of the byte array b
before the element
This method will first call getCurrentIndex() to get the cursor index value
then insert a segment of the byte array b before the element
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
This method will first call getCurrentIndex() to get the cursor index value
then insert the transcoded representation of a segment of the byte array b before the element
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
This method set the cursor in VTDNav to the nodes as recorded
in NodeRecorder, and return the output of "getCurrentIndex()"
It is important to notice that you can only go forward, not
backward
This method applies the modification to the XML document
and writes the output byte content accordingly to an outputStream
Notice that output is not guaranteed to be well-formed
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, the new content along with
whitespaces will 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 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", and the remaining
"d" is replace with a white space
P
P -
Static variable in class com.ximpleware.VTDNav
PARENT -
Static variable in class com.ximpleware.VTDNav
This method retrieves an XML document from the net using HTTP request
If the returned content type is "application xml" then it will proceed
with the parsing.
Record the cursor position
This method is implemented to be lenient on loading in
that it can load nodes from any VTDNav object
if vn is null, return false
Removes content from the master XML document
It first calls getCurrentIndex() if the result is
a starting tag, then the entire element referred to
by the starting tag is removed
If the result is an attribute name or ns node, then
the corresponding attribute name/value pair is removed
If the token type is one of text, CDATA or commment,
then the entire node, including the starting and ending
delimiting text surrounding the content, is removed
XMLModifier offers an easy-to-use interface for users to
take advantage of the incremental update of VTD-XML
The XML modifier assumes there is a master document on which
the modification is applied: users can remove an element, update
a token, replace an element name, or insert new content anywhere in the document
The process:
* The modification operations are recorded first
* The output() is called to generate output document