Re: [xml] XPath on a subtree



Daniel,

On 23 Mar 2013, at 11:52, Daniel Veillard wrote:

  ctxt->node = node;
  res = xmlXPathEval("./foo..", ctxt);
  ...

of course the subtree query will have to be relative, i.e. not
starting by /

Ah! The point I'd missed is that you can set ctxt->node. I couldn't
see an API call to set the current node. Could I suggest this might
be a useful function (if only an inline) so it gets into the docs?

Thanks.

-- 
Alex Bligh






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