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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:56:36+00:00 2026-06-07T06:56:36+00:00

Scope I am trying to parse this page . For those who are not

  • 0

Scope
I am trying to parse this page. For those who are not familiar with portuguese, this page contains all the Subjects from a certain Course (university course), grouped by “Semester”.

So, everytime you see something like this “7º Período Ideal”, you can understand like “Subjects
from the 7th semester”.

Problem I am using a XPath expression to get all the Table Rows from the table that contains those table rows.

XPath Used : //table[@cellspacing=2]//tr

C# Statement : htmlMap.DocumentNode.SelectNodes("//table[@cellspacing=2]//tr");

The HtmlNodeCollection received by this C# statement, contains only the table row nodes until the one with this text EAD0648 Gerência de Produtos / Serviços e Mercados, right after the one with 5º Período Ideal.

This XPath “works”, but i get all the tr's(as it is expected), and this is not what i want.

//tr

Why is the XPath not retrieving all the nodes after this node aswell ?

Is there any cap of ammount of nodes retrieved ?
Am i missing something ?

Thanks in advance

  • 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-07T06:56:38+00:00Added an answer on June 7, 2026 at 6:56 am

    I have encountered this in the past, if the tables are not well formed then issues like this occur. I took a very quick look at the HTML for the page and I see what looks like a possible problem, on line 2785 there is a </tr> then without a opening <tr> line 2796 has another </tr>.

    I admit that I did not do an in depth validation to check, but just by looking at it I could not match the opening <tr>. I immediately checked this because as I mentioned I have faced this exact issue with pages with malformed tables.

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

Sidebar

Related Questions

I am trying to parse this HTML page here with HTML Agility Pack, but
I this: http://jsfiddle.net/ZP76c/ I'm trying to control the scope at which jQuery selects elements
Basically this is a question how to access local scope handler. I trying to
I'm trying to bind the AJAX callback function to a certain scope, what am
I am trying to integrate the code from this demo: http://code.google.com/p/gwt-spring-starter-app/ into my main
For personal use i am trying to parse a little html page that show
Im trying to parse info from ifconfig (ubuntu). Normally, I would split a chunk
I am trying to run this simple query however it doesn't even parse saying
I'm trying to write a named scope that will order my 'Products' class based
I'm trying to set default scope according to some criteria determined by ana ActionController

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.