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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:10:53+00:00 2026-06-15T13:10:53+00:00

Possible Duplicate: Getting text between all tags in a given html and recursively going

  • 0

Possible Duplicate:
Getting text between all tags in a given html and recursively going through links

how can i use agility pack to pull out the words and information between the tags? i just to ignore all the tags in my html code and get all the words in between those tags. The html code has been saved by me in a string! now i want to use agility pack to accomplish this??

  • 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-06-15T13:10:54+00:00Added an answer on June 15, 2026 at 1:10 pm

    Well,

    it depends. If, for example, one tag has a class and it is unique- it is one function, but if there are multiple tags, you need to think and create your function based on tag location, another situation when there are no tags and you would have to count html elements; you might also need to loop over tabe rows for example.

    Example below does similar what you need. (not sure if it still works, since if there was a change in the page layout, it might fail.) But it gives the idea and you can go from there.

    PS – when asking questions please give exact problem, not the vague explanations.

                    String openUrl = @"http://www.ebay.com/sch/-/11724/i.html?_nkw=" + some_part_number + "&_armrs=1&LH_Complete=1";
    
                    HtmlWeb hw = new HtmlWeb();
                    hw.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)";
                    HtmlAgilityPack.HtmlDocument doc = hw.Load(openUrl);
    
                    foreach (HtmlNode nd in doc.DocumentNode.SelectNodes("//tr[@itemprop='offers']"))
                    {
                        String title = "";
                        title = Regex.Split(nd.InnerHtml.ToString(), ("title='"))[1].Trim();
                        title = Regex.Split(title, "'")[0].Trim();
                    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to get text between div tags with id being 1st attribute.
Possible Duplicate: Getting text within element excluding decendants I'm trying to use :not and
Possible Duplicate: Getting odd/even part of a sequence with LINQ How can I get
Possible Duplicate: Getting Enum value via reflection With mytype.ReflectedType.GetFields() I can get the constants
Possible Duplicate: How to hide text field in Html File Upload I'm setting up
Possible Duplicate: Detect all changes to a <input type=text> (immediately) using JQuery I have
Possible Duplicate: DOMDocument::load - PHP - Getting attribute value I use the following code:
Possible Duplicate: Getting Dates between a range of dates Let's say I have 2
Possible Duplicate: Sending HTML email from PHP I am sending emails using php through
Possible Duplicate: Getting specific days in a month I've touched on this problem once

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.