Here is another problem I get from this morning : I still use the same example.
If I use the "document/ROOT/FOO/ID" XPath query, I get two matches : - the first contains <ID>my_id</ID><ID>your_id</ID> - the second contains <ID>your_id</ID> Note that I use pointers and the method context.iteratePointers. I really don't understand how JXPath is working ...... Help !!!! Franck. > -----Message d'origine----- > De : LANTRES Franck [mailto:[EMAIL PROTECTED] > Envoy� : vendredi 30 janvier 2004 10:22 > � : [EMAIL PROTECTED] > Objet : [JXPATH] - misunderstood XPath response > > > Hi, > > I request a XML document which could be something like that : <ROOT> > <FOO> > <NAME>my_name</NAME> > <ID>my_id</ID> > </FOO> > <FOO> > <NAME>your_name</NAME> > <ID>your_id</ID> > </FOO> > </ROOT> > > > As I would like to get a particular FOO, I use the following > XPath query > : > document/ROOT/FOO[NAME='my_name'] > The XML I expect is > <FOO> > <NAME>my_name</NAME> > <ID>my_id</ID> > </FOO> > > But I get : > <FOO> > <NAME>my_name</NAME> > <ID>my_id</ID> > </FOO> > <FOO> > <NAME>your_name</NAME> > <ID>your_id</ID> > </FOO> > > If I use the query document/ROOT/FOO[NAME='my_name']/*, I get > the nodes I expect but without the FOO one, ie : > <NAME>my_name</NAME> > <ID>my_id</ID> > > > Where is the problem/bug ? > > Thanks for your help. > > Franck. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
