Re: [xml] xmlXPathEval(*str,*ctxt)

On Thu, Mar 28, 2002 at 11:48:06AM -0500, Robert G. Brown wrote:
On Thu, 28 Mar 2002, Daniel Veillard wrote:
Is there a reason that an empty object is allocated and returned even if
the xpath doesn't exist in the associated context?  What can one do with
with such an empty object?

  It's not an empty object.
  It is an object whose type is a node set and that set is empty.
Returning NULL means:
   - execution error
Otherwise the execution returns an object. That object has a type
and a content. You need the type and the content may be empty in case
of a node set. For the list of existing object type see the XPath
specification, XSLT also add Value Tree as an extra type.

  Look at the code of xmlXPathDebugDumpObject() in xpath.c


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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