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 7646759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:17:25+00:00 2026-05-31T10:17:25+00:00

I would like to parse my HTML page in a as generic way as

  • 0

I would like to parse my HTML page in a as generic way as possible. I don’t want to build a parser every time the page has been changed so I would like to parse it smartly by the value of the tags.

I know that the HTML Agility Pack provides tools to read and search by the type of tag(td,strong,li etc), but I would like to iterate all the tags and find information which I know by the content of the tag and not by the type of the tag because the type can change.

Example:
The page:

<table>
<tr valign="top">
<td valign="top">Sex:<br />
</td><td valign="top">Male<br />
</td></tr>
<tr valign="top">
<td valign="top">Current City:<br />
</td><td valign="top">New York<br /></td>
  • I know that the value will be “Sex:” and the next tag will contain
    the gender.
  • I know that the value will be “Current City:” and then the next
    tag will be the city.

I know I can iterate by the tags and but if the tags change my parser will no longer work.

Can I iterate by values and not by the type of tags?

  • 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-31T10:17:26+00:00Added an answer on May 31, 2026 at 10:17 am

    You could input all the nodes inside <table> into a HtmlNodeCollection. Then iterate through that list of nodes:

    foreach (HtmlNode node in ListofNodes)

    Within that, you could check the InnerHtml of each node to check for your specific strings? I guess the table has the same fields each time. Either that, or add id’s/css class and look for that specific id/css class.

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

Sidebar

Related Questions

I would like to know if there is a simple way to parse HTML
I would like to parse a html page and extract the meaningful text from
I would like to write a (HTML) parser based on state machine but I
Given an HTML page that is a text heavy article, I would like to
I would like to parse a string such as p1=6&p2=7&p3=8 into a NameValueCollection .
I would like to parse a document using SAX, and create a subdocument from
I would like to parse the values from aspx pages, both what is passed
I'm new to jQuery and would like to parse an XML document. I'm able
I need to write a bash script , and would like it to parse
Would like to make anapplication in Java that will not automatically parse parameters used

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.