Xpath predicate error

Discussion in 'XML' started by raymon2683@gmail.com, Feb 23, 2007.

  1. Guest

    Hi
    i 'm new to xpath , i used it to naviguate through an Xml document,
    since it's much easier.
    But a got a problem with the predicate:
    i have a web page that is supposed to enable user to find an
    element(Employee Details) in an xml file and it's child by giving
    either the Id or Name, through a text field .
    this is the code:
    if (document.Search.Type.checked="Id" )

    { x=document.Search.Details.value;
    var
    EmpDetails=myDoc.selectSingleNode("Employee/EmpData[@ID=x]");
    document.write(EmpDetails.xml);
    return;
    }
    The xpath predicate seems not to be able to get the value of the text
    field "Details".
    may you help me to get it through.
    thanks
    , Feb 23, 2007
    #1
    1. Advertising

  2. wrote:

    > { x=document.Search.Details.value;
    > var
    > EmpDetails=myDoc.selectSingleNode("Employee/EmpData[@ID=x]");
    > document.write(EmpDetails.xml);


    See answer in microsoft.public.xsl.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Feb 24, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sabba
    Replies:
    0
    Views:
    618
    Sabba
    May 9, 2006
  2. Duncan Smith
    Replies:
    7
    Views:
    477
    Joseph Kesselman
    Mar 22, 2007
  3. Ziphims

    XPath predicate problem

    Ziphims, Jan 11, 2008, in forum: XML
    Replies:
    6
    Views:
    1,759
    P. Lepin
    Jan 12, 2008
  4. Wabiloo
    Replies:
    1
    Views:
    820
    Martin Honnen
    Jan 25, 2008
  5. Phantom
    Replies:
    5
    Views:
    745
Loading...

Share This Page