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

  • SEARCH
  • Home
  • 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 6687137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:15:11+00:00 2026-05-26T05:15:11+00:00

I have the following chunk of HTML code but i cant figure how i

  • 0

I have the following chunk of HTML code but i cant figure how i can get the designated values

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body >
<form name="form1" method="post" action="" id="form1">
    <div>
    <table class="tableclass" >
       <tbody>
        <tr>        
        <tr>
            <td colspan="5" class="myclass1"><span id="myclass2">value1</span></td>
        </tr>

        <tr id="idvalue" aa="1" class="myclass3a">
            <td><a href="" target="_blank">value2</a></td>
            <td>value3</td>
            <td>value4</td>
            <td>value5</td>
            <td>value6</td>
        </tr>

        <tr id="idvalue" aa="2" class="myclass3b">
            <td><a href="" target="_blank">value2</a></td>
            <td>value3</td>
            <td>value4</td>
            <td>value5</td>
            <td>value6</td>
        </tr>

        <tr id="idvalue" aa="3" class="myclass3c">
            <td><a href="" target="_blank">value2</a></td>
            <td>value3</td>
            <td>value4</td>
            <td>value5</td>
            <td>value6</td>
        </tr>
        </tbody>
        </table>

    </div>

</form>
</body>
</html>

Let me analyze a little this code.

The page has a table with the 1st row having a slightly different format where i want to extract the value1 and the rest of the rows that each have an a variety of classes and different id values and from each row until the end of the table i want to extract value2, value3, value4, value5

Thanks for your time

  • 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-26T05:15:11+00:00Added an answer on May 26, 2026 at 5:15 am
    var doc = new HtmlDocument();
    doc.Load(url);
    
    var table = doc.DocumentNode.SelectSingleNode("//table[@class='tableclass']");
    var value1 = table.Descendants("tr").Skip(1)
        .Select(tr => tr.InnerText.Trim())
        .First();
    var theRest =
        from tr in table.Descendants("tr").Skip(2)
        let values = tr.Elements("td")
            .Select(td => td.InnerText.Trim())
            .ToList()
        select new
        {
            Value2 = values[0],
            Value3 = values[1],
            Value4 = values[2],
            Value5 = values[3],
            Value6 = values[4],
        };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning jQuery. I have the following chunk of code in an HTML
Having a major brain freeze, I have the following chunk of code: // Get
I have the following chunk of code. It works perfectly. <div id=restaurant_locations></div> <script type=text/javascript>
I came across the following weird chunk of code.Imagine you have the following typedef:
I have following plist: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
I have following code in initialization im = imread('Image02.tif'); figure(); imagesc(im); colormap(gray); [hImage hfig
I have the following chunk of python code: import hashlib class User: def _set_password(self,
I have a the following chunk of code that's adding up to six Player
I have the following chunk of header and footer code appearing in alot of
I have the following chunk of Python code (running v2.7) that results in MemoryError

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.