8 Replies Latest reply on Aug 27, 2008 4:39 AM by HowardTreisman

    How to select a specific XML node with XPath

    Level 1
      Hi,

      I'm trying to a select a specific node from my XML data using the XPath Builder.  For example, say I have a process variable 'xmlData' with the
      following contents:


       
          User 1
          101
       

       
          User 2
          102
       



      I can successfully use the following expression to retrieve the name of
      a specific user:

      (/process_data/xmlData/users/user[userid='102'])/name

      The problem is I need to use another process variable for the selection
      key.  For Example:

      (/process_data/xmlData/users/user[userid=/process_data/@userId])/name

      But this always returns null.  I've tried surrounding /process_data/@userId
      with single quotes, double quotes, and event {$..$}. 

      Any help would be greatly appreciated.

      Thanks.