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]
+--------------------------------+
BEGIN:VCARD
VERSION:2.1
N:Bannister;Jeff;P;Mr
FN:Jeff P Bannister
ORG:Integris;E-Solutions
TITLE:Senior Designer
TEL;WORK;VOICE:01442 232222
TEL;WORK;FAX:01442 884163
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;Hemel Hempstead;Maxted Road=0D=0A;Hemel Hempstead;Hertfordshire;HP27DZ;UK
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Hemel Hempstead=0D=0AMaxted Road=0D=0A=0D=0AHemel Hempstead, Hertfordshire H=
P27DZ=0D=0AUK
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010320T112326Z
END:VCARD

Reply via email to