Re: [xml] filtering a resulting NodeSet with xPath?

As I understand, xmlXPathNewContext expect an xmlDocPtr as its argument
Do you mean that I must create an xmlXPathContextPtr for every node from the previous resulting nodeSet?


----- Original Message ----- From: "Chris Burdess" <dog bluezoo org>
To: "Agustín Villena" <avillena tutopia com>
Cc: <xml gnome org>
Sent: Tuesday, November 23, 2004 7:01 AM
Subject: Re: [xml] filtering a resulting NodeSet with xPath?

Agustín Villena wrote:

It seems that I failed to obtain any attention from the xml gurus... The I must try again.

My doubt is :
- I don't undestand how libxslt implements its capacity of apply a xpath's query over a nodeset (even if this last is a result of another nodeset), since don't exists any API (in xpath.c) that allows to do so. Does the gurus have any pointer to a way to implement this functionality without using an XSLT transformation?

xmlXPathContextPtr ctx = xmlXPathNewContext (node);
xmlXPathObjectPtr eval = xmlXPathEval (expression, ctx);
xmlXPathFreeContext (ctx);
/* ... do stuff with eval ... */
Chris Burdess

xml mailing list, project page
xml gnome org

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