Package | Description |
---|---|
com.ximpleware |
Modifier and Type | Class and Description |
---|---|
class |
PilotException
This class is the base class of all the exceptions of autopilot.
|
Modifier and Type | Method and Description |
---|---|
int |
VTDNav.compareRawTokenString(int index,
java.lang.String s)
New in 2.0 Compare the string against the token at the given
index value.
|
int |
VTDNav.compareTokens_IgnoreCase(int i1,
VTDNav vn2,
int i2)
Since Version 2.13 This method compares two VTD tokens of VTDNav
objects while ignoring the case.
|
int |
VTDNav.compareTokens(int i1,
VTDNav vn2,
int i2)
Since Version 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, return 0 if two tokens
are the identical when converted to Unicode String using toString()
respectively
|
int |
VTDNav.compareTokenString(int index,
java.lang.String s)
New in 2.0 Compare the string against the token at the given
index value.
|
boolean |
VTDNav.contains_IgnoreCase(int index,
java.lang.String s)
Test whether a given token contains s.
|
boolean |
VTDNav.contains(int index,
java.lang.String s)
Test whether a given token contains s.
|
void |
VTDNav.dumpElementFragmentNs(java.lang.String fileName)
New in v2.12
Dump the ns compensated element fragment of xml into an XML file whose name is specified as fileName
|
void |
VTDNav.dumpFragment(long l,
java.io.OutputStream os)
New in v2.12
Dump a fragement as specified by a long into an output stream
|
void |
VTDNav.dumpFragment(long l,
java.lang.String fileName)
New in v2.12
Dump an element fragment of xml into an XML file whose name is specified as fileName
|
void |
VTDNav.dumpFragment(java.io.OutputStream os)
New in v2.12
Dump an element fragment of xml into an output stream
|
void |
VTDNav.dumpFragment(java.lang.String fileName)
New in v2.12
Dump an element fragment of xml into an XML file whose name is specified as fileName
|
boolean |
VTDNav.endsWith(int index,
java.lang.String s)
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
|
int |
AutoPilot.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
|
void |
VTDNav.fillXPathString(FastIntBuffer indexBuffer,
FastIntBuffer countBuffer) |
int |
VTDNav.getAttrVal(java.lang.String an)
Get the token index of the attribute value given an attribute name.
|
int |
VTDNav.getAttrValNS(java.lang.String URL,
java.lang.String ln)
Get the token index of the attribute value of given URL and local name.
|
long |
VTDNav.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
|
long |
VTDNav.getElementFragment()
Get the starting offset and length of an element encoded in a long, upper
32 bits is length; lower 32 bits is offset Unit is in byte.
|
ElementFragmentNs |
VTDNav.getElementFragmentNs()
getElementFragmentNS returns a ns aware version of the element fragment
encapsulated in an ElementFragment object
|
int |
VTDNav.getNormalizedStringLength(int index)
Get the string length of a token as if it is converted into a normalized UCS string
|
java.lang.String |
VTDNav.getPrefixString(int i)
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
|
int |
VTDNav.getRawStringLength(int index)
Get the string length as if the token is converted into a UCS string (entity not resolved)
|
long |
VTDNav.getSiblingElementFragments(int i)
Return the byte offset and length of up to i sibling fragments.
|
int |
VTDNav.getStringLength(int index)
getStringLength return the string length of a token as if the token is converted into
a string (entity resolved for character data and attr val)
|
java.lang.String |
VTDNav.getXPathStringVal() |
java.lang.String |
VTDNav.getXPathStringVal(short mode)
Return the String value of an Element Node
|
boolean |
VTDNav.hasAttr(java.lang.String an)
Test whether current element has an attribute with the matching name.
|
boolean |
VTDNav.hasAttrNS(java.lang.String URL,
java.lang.String ln)
Test whether the current element has an attribute with matching namespace
URL and localname.
|
void |
XMLModifier.insertAfterElement(byte[] b)
This method will first call getCurrentIndex() to get the cursor index value
then insert the byte array b after the element
|
void |
XMLModifier.insertAfterElement(byte[] b,
int contentOffset,
int contentLen)
This method will first call getCurrentIndex() to get the cursor index value
then insert a segment of the byte array b after the element
|
void |
XMLModifier.insertAfterElement(byte[] b,
long l1)
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
|
void |
XMLModifier.insertAfterElement(ElementFragmentNs ef)
Insert a namespace compensated element after cursor element
|
void |
XMLModifier.insertAfterElement(int src_encoding,
byte[] b)
Insert a byte array of given encoding into the master document
transcoding is done underneath to ensure the correctness of output
|
void |
XMLModifier.insertAfterElement(int src_encoding,
byte[] b,
int contentOffset,
int contentLen)
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
|
void |
XMLModifier.insertAfterElement(int src_encoding,
byte[] b,
long l1)
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
|
void |
XMLModifier.insertAfterElement(java.lang.String s)
This method will first call getCurrentIndex() to get the cursor index value
then insert the byte value of s after the element
|
void |
XMLModifier.insertAfterElement(VTDNav vn,
int contentOffset,
int contentLen)
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
the VTDNav object is the container of the XML document in byte array
|
void |
XMLModifier.insertAfterElement(VTDNav vn,
long l1)
This method will first call getCurrentIndex() to get the cursor index value
then insert a segment of the byte array b (contained in vn, and
transcode into a byte array) after the element,
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
|
void |
XMLModifier.insertAfterHead(byte[] b)
This method will insert byte array b after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(byte[] b,
int offset,
int len)
This method will insert a segment of the byte array b after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(byte[] b,
long l)
This method will insert a segment of the byte array b after the head of cursor element
|
void |
XMLModifier.insertAfterHead(ElementFragmentNs ef)
This method will insert an ElementFragmentNs instance
after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(int src_encoding,
byte[] b)
This method will insert the transcoded representation of
byte array b after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(int src_encoding,
byte[] b,
int offset,
int length)
This method will insert the transcoded representation of
a segment of the byte array b after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(int src_encoding,
byte[] b,
long l)
This method will insert the transcoded representation of
a segment of the byte array b after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(java.lang.String s)
This method will insert s' byte array representation
of the string after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(VTDNav vn,
int contentOffset,
int contentLen)
This method will insert a segment of the byte array b (contained in vn, and
transcode into a byte array) after the head of cursor element,
|
void |
XMLModifier.insertAfterHead(VTDNav vn,
long l1)
This method will insert a segment of the byte array b (contained in vn, and
transcode into a byte array) after the head of cursor element,
|
void |
XMLModifier.insertBeforeTail(byte[] b)
This method will insert byte array b right before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(byte[] b,
int offset,
int len)
This method will insert a segment of the byte array before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(byte[] b,
long l)
This method will insert a segment of the byte array before the tail of cursor element,
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
|
void |
XMLModifier.insertBeforeTail(ElementFragmentNs ef)
This method will insert a namespace compensated fragment before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(int src_encoding,
byte[] b)
This method will insert the transcoded representation of byte array b right before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(int src_encoding,
byte[] b,
int offset,
int length)
This method will insert the transcoded representation of a segment of byte array b right before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(int src_encoding,
byte[] b,
long l)
This method will insert the transcoded representation of a segment of the byte array before the tail of cursor element,
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
|
void |
XMLModifier.insertBeforeTail(java.lang.String s)
This method will insert byte content of string right before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(VTDNav vn,
int contentOffset,
int contentLen)
This method will insert a segment of the byte array (contained in vn, and
transcode into a byte array) before the tail of cursor element,
|
void |
XMLModifier.insertBeforeTail(VTDNav vn,
long l1)
This method will insert a segment of the byte array (contained in vn, and
transcode into a byte array) before the tail of cursor element,
l1 (a long)'s upper 32 bit is length, lower 32 bit is offset
|
boolean |
AutoPilot.iterate()
Iterate over all the selected element nodes in document order.
|
boolean |
AutoPilot.iterate2() |
int |
AutoPilot.iterateAttr()
This method is meant to be called after calling selectAttr() or
selectAttrNs(), it will return the vtd index attribute name or -1 if
there is none left
|
boolean |
VTDNav.matchElement_IgnoreCase(java.lang.String en)
Since version 2.13
Test if the current element matches the given name, case difference ignored
|
boolean |
VTDNav.matchElement(java.lang.String en)
Test if the current element matches the given name.
|
boolean |
VTDNav.matchElementNS_IgnoreCase(java.lang.String URL,
java.lang.String ln)
Since 2.13
Test whether the current element matches the given namespace URL and
localname.
|
boolean |
VTDNav.matchElementNS(java.lang.String URL,
java.lang.String ln)
Test whether the current element matches the given namespace URL and
localname.
|
boolean |
VTDNav.matchRawTokenString_IgnoreCase(int index,
java.lang.String s)
Since version 2.13
Match the string while ignore the case against the token at the given index value.
|
boolean |
VTDNav.matchRawTokenString(int index,
java.lang.String s)
Match the string against the token at the given index value.
|
boolean |
VTDNav.matchTokens_IgnoreCase(int i1,
VTDNav vn2,
int i2)
Since version 2.13
This method matches two VTD tokens of VTDNav objects while ignore the case
|
boolean |
VTDNav.matchTokens(int i1,
VTDNav vn2,
int i2)
This method matches two VTD tokens of VTDNav objects
|
boolean |
VTDNav.matchTokenString_IgnoreCase(int index,
java.lang.String s)
Since 2.13
Match the string against the token at the given index value while ignoing the case.
|
boolean |
VTDNav.matchTokenString(int index,
java.lang.String s)
Match the string against the token at the given index value.
|
double |
VTDNav.parseDouble(int index)
Convert a vtd token into a double.
|
float |
VTDNav.parseFloat(int index)
Convert a vtd token into a float.
|
int |
VTDNav.parseInt(int index)
Convert a vtd token into an int.
|
long |
VTDNav.parseLong(int index)
Convert a vtd token into a long.
|
void |
VTDNav.recoverNode(int index)
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
|
void |
XMLModifier.remove()
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
|
void |
XMLModifier.remove(long l)
Remove a byte segment from XML.
|
void |
XMLModifier.remove(long l1,
long l2,
short actionType)
Available since 2.13
Remove a byte segment from XML, the byte segment is the result of performing an operation
on two overlapping segments.
|
boolean |
VTDNav.startsWith(int index,
java.lang.String s)
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
|
boolean |
VTDNav.toElement(int direction)
A generic navigation method.
|
boolean |
VTDNav.toElement(int direction,
java.lang.String en)
A generic navigation method.
|
boolean |
VTDNav.toElementNS(int direction,
java.lang.String URL,
java.lang.String ln)
A generic navigation method with namespace support.
|
java.lang.String |
VTDNav.toNormalizedString(int index)
This method normalizes a token into a string value of character data
and attr val in a way that resembles DOM.
|
java.lang.String |
VTDNav.toNormalizedString2(int index)
(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.
|
java.lang.String |
VTDNav.toNormalizedXPathString(int j) |
java.lang.String |
VTDNav.toRawString(int index)
Convert a token at the given index to a String,
(entities and char references not expanded).
|
java.lang.String |
VTDNav.toRawString(int os,
int len)
Convert a segment of XML bytes a into string, without entity resolution
|
java.lang.String |
VTDNav.toRawStringLowerCase(int index)
Convert a token at the given index to a String, upper case chars
get converted into lower case
(entities and char references not expanded).
|
java.lang.String |
VTDNav.toRawStringUpperCase(int index)
Convert a token at the given index to a String, lower case chars
get converted into upper case
(entities and char references not expanded).
|
java.lang.String |
VTDNav.toString(int index)
Convert a token at the given index to a String, (entities and char
references resolved character data and attr val).
|
java.lang.String |
VTDNav.toString(int os,
int len)
Convert the byte content segment (in terms of offset and length) to
String (entities are resolved)
|
java.lang.String |
VTDNav.toStringLowerCase(int index)
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 for character data and attr val).
|
java.lang.String |
VTDNav.toStringUpperCase(int index)
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 character data and attr val).
|
void |
XMLModifier.updateElementName(java.lang.String newElementName)
Replace the cursor element's name with a new name
|