Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Extracting a single line from a HTML

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Extracting a single line from a HTML

    Iv seen this posted around the web a fair bit but nothing has answered my question.

    Below is a HTML file which im trying to extract a line from, I'm trying the use line 101 in particular the comment Open/Unset to trigger an action in visual basic. This field switches from Open/Unset to Closed/Set.

    Id like this to trigger an action in a program iv created using visual basic, any help would be appreciated.


    <table bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="120">Reference No : </td>
    <td width="10"> </td>
    <td width="80"><span id="lbExternalRefNo" style="font-weight:bold;">33395</span></td>
    <td>Site Name : </td>
    <td width="10"> </td>
    <td width="300"><span id="lbName" style="font-weight:bold;">Paul / Allwood Residence, Clinton & Rachael </span></td>
    <td>Status :</td>
    <td width="10"> </td>
    <td><img id="StatusImage" src="Door3.gif" alt="Open/Unset" style="border-width:0px;" /></td>
    </tr>
    </table><br>

    <script language="javascript">document.Form1.__TabStrip_Co ntrol_State__.value=0;</script>
    <table cellspacing="0" cellpadding="0" border="0" id="TabStrip_Control" style="display:inline-block;height:40px;width:750px;">
    <tr>
    <td nowrap width="79" height="21" align="center" bgcolor="white" style="padding-left:5px;font-family:verdana;font-weight:bold;font-size:8pt;width:79;height:21;text-align:center;border:solid 1px black;border-bottom:none;background-color:white;padding-ledft:5px;padding-right:5px;color:#993333;"><font face="verdana" color="#993333" size="1"><b>Site Details</b></font></td>
    <td nowrap bgcolor="#dddddd" width="79" height="21"




    Other page looks like this.




    <table bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="120">Reference No : </td>
    <td width="10"> </td>
    <td width="80"><span id="lbExternalRefNo" style="font-weight:bold;">33395</span></td>
    <td>Site Name : </td>
    <td width="10"> </td>
    <td width="300"><span id="lbName" style="font-weight:bold;">Paul / Allwood Residence, Clinton & Rachael </span></td>
    <td>Status :</td>
    <td width="10"> </td>
    <td><img id="StatusImage" src="Door3.gif" alt="Closed/Set" style="border-width:0px;" /></td>
    </tr>
    </table><br>

    <script language="javascript">document.Form1.__TabStrip_Co ntrol_State__.value=0;</script>
    <table cellspacing="0" cellpadding="0" border="0" id="TabStrip_Control" style="display:inline-block;height:40px;width:750px;">
    <tr>
    <td nowrap width="79" height="21" align="center" bgcolor="white" style="padding-left:5px;font-family:verdana;font-weight:bold;font-size:8pt;width:79;height:21;text-align:center;border:solid 1px black;border-bottom:none;background-color:white;padding-ledft:5px;padding-right:5px;color:#993333;"><font face="verdana" color="#993333" size="1"><b>Site Details</b></font></td>
    <td nowrap bgcolor="#dddddd" width="79" height="21"


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Extracting a single line from a HTML

    And what does this have to do with Java? Is this a javascript question? I've moved this to the Other Programming Languages section until otherwise convinced this is a java question

Similar Threads

  1. extracting a list of few lines from html file
    By Vaibhav.forpro in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: April 14th, 2012, 08:35 AM
  2. Replies: 10
    Last Post: September 16th, 2011, 07:49 PM
  3. Replies: 3
    Last Post: April 11th, 2011, 09:51 PM
  4. How to Read a file line by line using BufferedReader?
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: May 19th, 2008, 06:32 AM