Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IDOMNodesetSort::sortByExpression ( p6IDOMXML pXMLTree,
P6DOMNODE_SORT  type,
p6IXpathExpression pExp 
)
pure virtual

Sort the p6IXMLNode components in the p6IDOMNodeset container.

Note, that calling this function successfully causes an implicit reset() on the enumerator. This is necessary since the order of the elements in the set have changed.

A sort key is generated for each p6IXMLNode in the set by applying the XPath expression on each node. The XPath expression must generate the sort key type as specificied in the 'type' parameter.

Parameters
pXMLTree[ in ] XML tree that can be used to evaluate the pExp expression.
type[ in ] How to re-order the nodes in the set. The pExp parameter should provide the sort key of the proper type (i.e., numeric, string, time).
pExp[ in ] XPath component used to generate the sort key for each node in the node set.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgOne of the parameters is NULL.
P6R::eNotInitializedThe component is in an invalid state.
P6R::eTypeErrorpExp not generating value required by type paramter.