Correct Xpath to output title in this example? -


i'm playing around piece of code, trying figure out how extract title information via xpath, , since it's on internal network, don't have access firepath.

<div style="float:left"> <table border="0"> <tbody>    <tr width="100%">       <td valign="top">code not matter</td>       <td colspan="2">           <span class="textinfo">           <a href="http.....">              <b> hi!  title!</b>           </a>           </span>       </td>    </tr>    <tr></tr>    <tr></tr>    <tr width="100%">       <td valign="top">code not matter</td>       <td colspan="2">           <span class="textinfo">           <a href="http.....">              <b> hi!  here title!</b>           </a>           </span>       </td>     </tr>    </tbody>   </table>   </div>  

it goes on while. there 10 results , i'm trying figure out how titles. ideas? did provide enough info? thanks!

what have in sample isn't valid xml, have root element. if assume there's no namespaces defined (there shouldn't be) then...

you can use inner text of element :

//td/span[@class='textinfo']/text() 

i wouldn't put a , b there - "disabled" title wouldn't have a example. in either case using xpath find "title" isn't reliable approach


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -