Results 1 to 2 of 2

Thread: [RESOLVED]problem with html parsing

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    218

    [RESOLVED]problem with html parsing

    hello friends im trying to strip http://www.nseindia.com/content/equities/TopGainers.htm

    this page so that i get the values in the table

    this is the output of my code

    Symbol,Open Price,High Price,Low Price,LTP,Prev Close,% Change,Total
    trd qty,Last
    Ex Date,Last
    Corporate Action
    SIRPAPER,54.10,63.65,54.10,62.60,53.55,16.90,113325,19-JUL-06,AGM/FINAL DIVIDEND-10%
    EMKAY,60.25,66.80,60.10,64.00,57.20,11.89,63706,07-JUL-06,AGM/DIVIDEND-10%

    but i want to get is

    Symbol,Open Price,High Price,Low Price,LTP,Prev Close,% Change,Total trd qty,Last Ex Date,Last Corporate Action
    SIRPAPER,54.10,63.65,54.10,62.60,53.55,16.90,113325,19-JUL-06,AGM/FINAL DIVIDEND-10%
    EMKAY,60.25,66.80,60.10,64.00,57.20,11.89,63706,07-JUL-06,AGM/DIVIDEND-10%

    im able to get the values and its headers but there is a problem with a <br>tag in a <td> where the header is Total trd qty,Last Ex Date,Last Corporate Action.the code i have written strips the <br> tag and then adds Total on one line and trd qty on other line same is the case for all the other headers mentioned

    im attaching the code with this

    anyone pls help me to the the headers on one line so my output headers looks like


    Symbol,Open Price,High Price,Low Price,LTP,Prev Close,% Change,Total trd qty,Last Ex Date,Last Corporate Action

    instead of

    Symbol,Open Price,High Price,Low Price,LTP,Prev Close,% Change,Total
    trd qty,Last
    Ex Date,Last
    Corporate Action
    Last edited by rohitb; May 2nd, 2007 at 12:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width