HTML parse problem
I used libxml2 to parse this HTML file
https://www.ibiblio.org/hyperwar/AAF/StatDigest/aafsd-3.html
with the purpose of extracting this table
https://www.ibiblio.org/hyperwar/AAF/StatDigest/aafsd-3.html#t82
The CSS selector for this table from Chrome is:
body > blockquote:nth-child(93) > p:nth-child(4) > table
The table is a child of the <p>
node. This can be seen from the HTML code.
But libxml2 parses the table as a sibling instead of a child. So the above selector doesn't work, but the following one does
body > blockquote:nth-child(93) > p:nth-child(4) + table
I believe the correct behavior should be to parse the table as a child.