Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: Will Multiple tags through the parser off?

$
0
0
Basically I am to select certain elements, like //table[2], but I cannot specify any indexes as it returns a null element.

I am wondering if having multiple <html> tags could be the issue.

In short this is how my html structure looks that I am pulling from.
<html> 
     <table> 
          //table 1 contents 
          <table> 
               //table 1 - A contents 
          </table> 
     </table> 
</html> 
<html> 
     <table> 
               //table 2 contents 
          <table> 
               //table 2 - A contents 
          </table> 
          <table> 
               //table 2 - B contents 
          </table> 
          <table> 
               //table 2 - C contents 
          </table> 
     </table> 
</html> 
<html> 
     <table> 
          //table 3 contents 
     </table> 
</html>
So if I want table 2 - B, I would say
"//table[2]//table[2]"
Which returns a null element.

So whenever I try to use a index [#], it does not work. Any guess as to why?

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>