using xpath expression to grab contents of tag B based on value of tag A #24

Closed
wickkidd opened this Issue May 1, 2012 · 1 comment

2 participants

@wickkidd

I need to grab the value of <s> when the <fieldId> is 61. The following works at http://www.bit-101.com/xpath/ ...

//metadata[fieldId=61]/value/s

I've tried every syntax I can think of to get the value, but I always get nil. Any thoughts?

Here's the xml:

<document>
  <metadata>
    <fieldId>60</fieldId>
     <value>
        <s>AG-569R-S-12-0010</s>
     </value>
  </metadata>
  <metadata>
    <fieldId>61</fieldId>
      <value>
        <s>Solicitation 1</s>
     </value>
  </metadata>
</document>
@jnunemaker
Owner

Closing due to staleness and the fact that the project is currently not being maintained.

@jnunemaker jnunemaker closed this Jun 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment