Hi,
FYI: The function xmlXPathCompiledEvalToBoolean() was
added to the API.
Regards,
Kasimier
> -----Original Message-----
> From: xml-bounces gnome.org [mailto ml-bo
unces gnome.org] On
> Behalf Of Buchcik, Kasimier
> Sent: Tuesday, June 20, 2006 8:30 PM
> To: xml gnome.org
> Subject: [xml] New function
xmlXPathCompiledEvalIsTrue()
>
> Hi,
>
> I'd like to add the following public function to
xpath.h. It will
> evaluate an expression and convert it internally to a
boolean result.
> This will spare the need of exchanging an XPath boolean
object, plus
> the evaluation can be optimized to stop at the first
sign
> of a positive result.
>
> /**
> * xmlXPathCompiledEvalIsTrue:
> * comp: the compiled XPath expression
> * ctxt: the XPath context
> *
> * Evaluates the given compiled expression and applies
the XPath
> boolean()
> * function on the result.
> *
> * Returns 1 if the expression evaluated to true, 0 if
to false and
> * -1 on API and internal errors.
> */
> int xmlXPathCompiledEvalIsTrue(xmlXPathCompExprPtr
comp,
> xmlXPathContextPtr ctxt);
>
> Any cons?
>
> Regards,
>
> Kasimier
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|