Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
[IMG]http://i57.tinypic.com/16izib9.png[/IMG]

I need to retrieve this table from here: http://uob.com.sg/personal/loans/personal-loan.html#rates-tenors[^]

I used https://developer.yahoo.com/yql/[^] to retrieve the data from the above website.

[QUOTE] YQL Query: select * from html where url='http://uob.com.sg/personal/loans/personal-loan.html#rates-tenors' and xpath='//div[@class="nova-table-container"]' [/QUOTE]

Then I used Jsfiddle to display the table in which I wanted to retrieve here:

jsfiddle.net/uh8akco4/18[^]

Problem: the table only shows up as an Object.

How do I display the full table?


EDIT: I actually managed to retrieve the 1st row.

http://jsfiddle.net/wsszuaw6/2/[^]

But because there are several merged cells in the table I wasn't able to retrieve the rest of the rows properly.
Posted
Updated 29-Jun-15 16:20pm
v5
Comments
Abhishek Pant 29-Jun-15 2:25am    
Why dont' you use HtmlAgility pack for scrapping for extacting data from the website
Member 11798791 29-Jun-15 22:19pm    
I'm actually quite close to displaying the table...

http://jsfiddle.net/wsszuaw6/2/

I managed to retrieve the 1st row and that's about it... :/

1 solution

Paste this into your website :
XML
<table width="700" border="0" cellspacing="0" cellpadding="0">
              <tbody>
              <tr class="dark_blue">
                <th width="25%" class="center">Loan Tenor<br>(months)</th>
                <th width="25%" class="center">Processing Fee<br>(%)</th>
                <th width="25%" class="center">Flat Rates<br>(% p.a.)</th>
                <th width="25%" class="center">Effective Interest Rates<br>(% p.a)</th>
              </tr>
              <tr class="darker row-odd">
                <td class="item center">12</td>
                <td rowspan="3" align="center" class="item light-blue center" style="background-color:#f0f7ff; border-right:2px solid #ffffff;">1.5</td>
                <td rowspan="3" class="item light-blue center" style="background-color:#f0f7ff">4.25</td>
                <td class="item center">10.61</td>
              </tr>
              <tr>
                <td class="item center">24</td>
                <td class="item center">9.46</td>
              </tr>
              <tr class="darker row-odd">
                <td class="item center">36</td>
                <td class="item center">8.99</td>
              </tr>
            </tbody>
            </table>
 
Share this answer
 
Comments
Member 11798791 29-Jun-15 0:08am    
The data in the table cannot be static.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900