Re: [xml] Return type of the xpath query during the compilation of xpath



Hi Daniel,

xmlXPathCompExprPtr->steps[xmlXPathCompExprPtr->last -1]->op .
last -1 because libxml always sort the results.

will the above thing works for finding the last xpath operation.

Also will the approach of last operation to determine the return type of query will work except for variables ?

Thanks.
Regards,
Umesh
Daniel Veillard wrote:
On Fri, May 30, 2008 at 10:05:07AM +0530, Umesh Chandak wrote:
Hi ,
Is there any easy way to find out the last operation (function call, operator, location path) in xpath compilation ? Because it can be easy to find out the return type from the last operation being performed on xpath.

  At the API level, no because the structure of a compiled XPath
is not public. See xmlXPathCompExprPtr in xpath.h and struct _xmlXPathCompExpr
in xpath.c

Daniel





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]