GrovePos — GrovePos denotes a position in the XML tree (grove).
class GrovePos: enum Type { UNKNOWN_POS, ELEMENT_POS, TEXT_POS }; # construct/copy/destruct __init__() __init__(const GroveNode &) __init__(const GroveNode &, const GroveNode &) __init__(const GroveText &, long) __init__(const SString &, const GroveNode &) # public member functions SString asString() const bool isNull() const Type type() const GroveNode node() const GroveNode before() const GroveText text() const long idx() const GroveErs getErs() const None dump() const
There are two kinds of GrovePos: TEXT_POS and ELEMENT_POS. For TEXT_POS, position consists of reference to text node and offset in text; for ELEMENT_POS, position consists of parent node and "before" node (position in tree is assumed just before "before" node; of before node is NULL, then position is right after the last child of the parent node).
GrovePos
construct/copy/destructConstruct NULL GrovePos.
Constructs ELEMENT_POS.
Constructs ELEMENT_POS.
Constructs TEXT_POS (idx means offset in text, starting from 0).
Constructs GrovePos from text representation (path starting at root).
GrovePos
public member functionsSString asString() const
Returns text representation of GrovePos (like "xpath path").
Returns true if position is not initialized.
Return type of grove position, see Type enum.
GroveNode node() const
These are returned for ELEMENT_POS.
GroveNode before() const
These are returned for ELEMENT_POS.
GroveText text() const
These are returned for TEXT_POS.
These are returned for TEXT_POS.
GroveErs getErs() const
Get current entity context for this position.
Dump GrovePos.