Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5968411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:05:10+00:00 2026-05-22T20:05:10+00:00

I have trying to get around making my first C# application(that can do more

  • 0

I have trying to get around making my first C# application(that can do more than just say “Hello world”),

now the html file got lots of tags,(but got only two h4 tags that are given below.)
but here is the part that i am interested in:

<table width="100%" height="400" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" background="images/page_bg.gif" style="BORDER-COLLAPSE: collapse">

<tbody valign="top">
<tr>
<td>

<table width="80%" border="0" valign=top background="images/page_bg.gif">
 <tr>
 <td>

  <div align="center">
   <h4 align="center">
      <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
      <b>
      <font size="4" face="Arial, Helvetica, sans-serif">
      UNWANTED TEXT
       </font></b></font></h4>

  <p><br />
  Name  :  {NAME HERE} <br>Number : {NUMBERS HERE}<br>Number2 : {NUMBERS2}<br><br><h4>UNWANTED TEXT</h4><br>detail NO.  :  <span class=style7>{NUmbers3}</span><br><br><a href=http://test.xom>UNWANTED TEXT</a><br><br>                    
  </p>
  <p class="content"><em><strong>
  <p>&nbsp;</p>

I wish to get NAME,Numbers1,Numbers2,Numbers3, So, i guess i got to do something like this =

 //div[@align = "centre"]/h4/followingsibling::Text();

but surely it is incomplete, any ideas on how should i do it, I got the Xpath from firebug :
/html/body/table/tbody/tr[2]/td/table/tbody/tr/td/table/tbody/tr[2]/td/div/table/tbody/tr/td/table/tbody/tr/td/div/h4

i have also tried doing(for just getting the raw data first and then trimming it further)

 HtmlNodeCollection node = doc.DocumentNode.SelectNodes("//table[@height='400']//div[@align='centre']"//p);
            foreach(HtmlNode node1 in node)    
                textBox1.Text += node1.InnerText;

But the Node here is passed on as NULL
Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:05:11+00:00Added an answer on May 22, 2026 at 8:05 pm

    Firefox adds tbody tag to table (in original html this tag can be absent). So, I would suggest do not write all path, find most characterizing path and use //.
    For example, //div[@class=’data’]/table//tr/td

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get around this error for a day now and
I'm trying to get my head around why the following doesn't work. I have
I'm still trying to get my head around using Java's generics. I have no
I have been trying to get more in to TDD. Currently keeping it simple
We're trying to get SMB volume listings in our OS X application, and have
just exploring c# 4. Trying to get my head around all this dynamic stuff.
Ok I'm trying to get my head around g++ and librarys. I have a
I am trying get my head around how you can run the following php:
I was just reading the guidelines and trying to get my head around the
I have been trying for a long time to get SQL Server Express on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.