Have you tried [@name='dataDescription' and @tag='10'] or something along these lines?
HTH, Matt On Fri, Feb 15, 2013 at 11:51 AM, Singh, Rupinder < [email protected]> wrote: > I have a jxpath expression question. > > > > Map m = new HashMap(); > > Map[] dd = new HashMap[2]; > > dd[0] = new HashMap(); > > dd[0].put("tag", "10"); > > dd[0].put("score", "100"); > > dd[1] = new HashMap(); > > dd[1].put("tag", "11"); > > dd[1].put("score", "90"); > > Map ddk = new HashMap(); > > ddk.put("dataDescription", dd); > > m.put("Values", ddk); > > > > JXPathContext xpathContext = IDataJXPathContext.newContext(m); > > Object works = > xpathContext.getValue("//dataDescription[tag='10']"); //This returns > the correct data as expected > > Object doesntWork = > xpathContext.getValue("//.[@name='dataDescription'][tag='10']"); // This > does not bring up anything > > > > > > I have to use @name as the actual names have special characters in them. > Can anybody help with what the correct syntax for this should be ? > > > > Thanks > > > > Rupinder > > > >
