Will Multiple <html> tags through the parser off?

Topics: Developer Forum
Oct 1, 2014 at 8:58 PM
Edited Oct 1, 2014 at 9:00 PM
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?