|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CXpathNodeSet: public CInterface { public: CXpathNodeSet(Xpath::CNodeSet *pNodeSet); CXpathNodeSet(const CXpathValue &value); ~CXpathNodeSet(); public: Dom::XNode GetCurrent(); int GetPosition(); int GetCount(); void Reset(); void Next(); CString ToString(); public: Xpath::CNodeSet *GetNodeSet(); Xpath::CIterator *GetIterator(); }; typedef XInterface<CXpathNodeSet> XXpathNodeSet;
Encapsulates XPath node sets.
Objects of this class provide the facility for iterating through node sets. That is, each node set object has the current node and the current position properties, and provides interface for iterating to the next node in the node set.
Objects of this class are usually constructed from XPath values
(
CXpathValue
).
CXpathValue, Dom::INode
Constructor/Destructor Summary | |
CXpathNodeSet
(Xpath::CNodeSet *pNodeSet);
����������Constructs the node set from the internal representation. |
|
CXpathNodeSet
(const CXpathValue &value);
����������Construct the node set from the given source XPath value |
|
~CXpathNodeSet
();
����������Destroys the node set. |
Function Summary | |
Dom::XNode
|
GetCurrent
();
����������Returns the current node of this node set. |
int
|
GetPosition
();
����������Returns the current position of this node set. |
int
|
GetCount
();
����������Returns the number of nodes in this node set. |
void
|
Reset
();
����������Resets the iterator associated with this node set. |
void
|
Next
();
����������Iterates to the next node in this node set. |
CString
|
ToString
();
����������Returns the string value of this node set. |
Xpath::CNodeSet�*
|
GetNodeSet
();
����������Returns the internal representation of XPath node set encapsulated in this object. |
Xpath::CIterator�*
|
GetIterator
();
����������Returns the internal representation of XPath node set iterator encapsulated in this object. |
Constructor/Destructor Detail |
CXpathNodeSet(Xpath::CNodeSet *pNodeSet);
Constructs the node set from the internal representation.
This constructor is intended mainly for the toolkit internal use.
pNodeSet
- the internal representation of
the XPath node set to be encapsulated in this objectCXpathNodeSet(const CXpathValue &value);
Construct the node set from the given source XPath value
It is an error if this value does not represent a node set
(that is, has the type other than
CXpathValue::typeNodeSet
).
value
- the source XPath value~CXpathNodeSet();
Destroys the node set.
Function Detail |
Dom::XNode GetCurrent();
Returns the current node of this node set.
Originally the current node is set to the first node in
the node set, or to
NULL
is the node set is empty.
Each time the
Iterate
method is invoked,
the current node is set to the next sibling of the previously
set current node, or to
NULL
is there is no next
sibling.
The model of the current node is always XDM (that is, XPath document model.
NULL
if there is no current node.int GetPosition();
Returns the current position of this node set.
The number of the first position in the node set is
1
.
Originally the current position is set to
1
is the node
set is not empty, or to
0
otherwise. Each time
the
Iterate
method is invoked, the current position
is incremented by one unless the current node becomes
NULL
(that is, end of the node set is reached),
in which case the current position is set to
0
.
int GetCount();
Returns the number of nodes in this node set.
void Reset();
Resets the iterator associated with this node set.
The current node is reset to the first node of this
node set, or to
NULL
if the node set is empty.
The current position is reset to
1
if
the node set is not empty, and to
0
otherwise.
void Next();
Iterates to the next node in this node set.
The current node and the current position are changed as described above.
CString ToString();
Returns the string value of this node set.
The string value of the node set is a string value of its first node, or the empty string if the node set is empty.
Xpath::CNodeSet *GetNodeSet();
Returns the internal representation of XPath node set encapsulated in this object.
This method is intended mainly for the toolkit internal use.
Xpath::CIterator *GetIterator();
Returns the internal representation of XPath node set iterator encapsulated in this object.
This method is intended mainly for the toolkit internal use.
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |