Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using Xpath to get data based on a text filed

Status
Not open for further replies.

kagh78

Programmer
Jun 8, 2007
1
SE
Hello

I have converted an HTML page to xml file and then from this xml file I need to get some data, but I need to get this data based on the stock name so how I can do this in xpath expression?
my xml piece file is

- <table cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr class="TightListLightRowTR">
<td class="TightListStandardTD"> </td>
- <td class="TightListStandardTD">
<a href="javascript:eek:penSW('49','CH0012221716');">ABB Ltd</a> "in this tage my stock name"
</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">147,25</td>
- <td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">
<span class="BlueText">0,51</span>
</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">0,75</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">147,25</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">147,50</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">147,75</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">142,75</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">19,96</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top">230,36</td>
<td align="right" class="TightListStandardTD" nowrap="nowrap" valign="top"> 000529</td>
</tr>

so I need to write xpath expression to get these numeric values based on the stock name in the tag <a> "i put a notice where is it in xml piece" ?

so please can anyone help me in this?


 
Here is a tutorial on XPath.

You will also need to have some relationship between your 'stock name' and the numbers. It is not obvious...

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top