Hi Jeff I can't see whats wrong with the XPath but this expression should definitely work
//userEntry[name='jeff'] James ----- Original Message ----- From: "Jeff Bannister" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 15, 2002 6:23 PM Subject: [Jaxen] Simple XPath expression not working... > Hi, > > I have the following code... > > XPath xPath = new XPath("//userEntry/name[child::text()='jeff']/.."); > Element userDetail = (Element)xPath.selectSingleNode(doc); > > and the following XML file... > > <sso> > <userEntry> > <name>jeff</name> > <lids> > <user>ULLTT12</user> > <pass>letmein</pass> > </lids> > <posh> > <user>ULLTT13</user> > <pass>letmein</pass> > </posh> > <cmr> > <user>ULLTT14</user> > <pass>letmein</pass> > </cmr> > </userEntry> > </sso> > > However the code shown above always returns null. It works it I remove the > predicate, any ideas ? > > regards, > > Jeff. > > > +--------------------------------+ > Tel. Work Int. 773 5068 > Tel. Work Ext. 01442 885068 > Mob. Int. 735 8128 > Mob. Ext. 0802 949386 > Email [EMAIL PROTECTED] > +--------------------------------+ > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest