You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Wannheden, Knut" <kn...@paranor.ch> on 2003/06/05 16:37:31 UTC

RE: [jxpath] JXPathContext#iterate(String) returns same object mu ltip le times

Dmitri,

> 
> No, you are absolutely right.  JXPath is guaranteed to returned unique
> pointers, but not unique objects.  If your graph has multiple paths to
> the same object, it may be returned repeatedly. The "//" axis has a
> protection built into it against simple loops like a->b->a 
> (you'll need
> to use the nigthly build to get that behavior).  Other than that there
> is really no cure other than specifying more explicit paths. 
> 

Thanks for the reply.

That sounds reasonable.  I'll get the latest version from CVS.  I'll try to
figure out if I can make JXPath understand my parent/child relationships,
which would hopefully let my use the XPath parent and child axis.

--
knut