Java xpath selection

Posted by Travis on Stack Overflow See other posts from Stack Overflow or by Travis
Published on 2010-06-16T05:23:48Z Indexed on 2010/06/16 5:32 UTC
Read the original article Hit count: 238

Filed under:
|

I'm having a little trouble getting values out of an XML document. The document looks like this:

<marketstat>  

<type id="35"> 
  <sell> 
    <median>6.00</median>  
  </sell> 
</type>  

<type id="34">    
  <sell> 
    <median>2.77</median> 
  </sell> 
</type>      

</marketstat> 

I need to get the median where type = x.

I've always had trouble figuring out xpath with Java and I can never find any good tutorials or references for this. If anyone could help me figure this out that would be great.

© Stack Overflow or respective owner

Related posts about java

Related posts about xpath