{"action":"created","issue":{"url":"https://api.github.com/repos/crubba/htmltab/issues/10","labels_url":"https://api.github.com/repos/crubba/htmltab/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/crubba/htmltab/issues/10/comments","events_url":"https://api.github.com/repos/crubba/htmltab/issues/10/events","html_url":"https://github.com/crubba/htmltab/issues/10","id":103668997,"number":10,"title":"All tables parsed in html file except one","user":{"login":"JSB97","id":6333024,"avatar_url":"https://avatars.githubusercontent.com/u/6333024?v=3","gravatar_id":"","url":"https://api.github.com/users/JSB97","html_url":"https://github.com/JSB97","followers_url":"https://api.github.com/users/JSB97/followers","following_url":"https://api.github.com/users/JSB97/following{/other_user}","gists_url":"https://api.github.com/users/JSB97/gists{/gist_id}","starred_url":"https://api.github.com/users/JSB97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSB97/subscriptions","organizations_url":"https://api.github.com/users/JSB97/orgs","repos_url":"https://api.github.com/users/JSB97/repos","events_url":"https://api.github.com/users/JSB97/events{/privacy}","received_events_url":"https://api.github.com/users/JSB97/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-28T08:21:06Z","updated_at":"2015-08-28T13:01:59Z","closed_at":null,"body":"I am parsing tables from here;\r\nhttps://www.dropbox.com/s/dkh2b7qifjhj0sc/0103010_honbun_jpcrp030000-asr-001_E01814-000_2015-03-31_01_2015-06-22_ixbrl.htm?dl=0\r\n\r\nUsing the following code;\r\n          table.df <- htmltab(doc = html.file,which=i)\r\n\r\nwhere i=1,2,...6.\r\n\r\nFor i=2,4 the tables are parsed correctly, 1,3,5 are empty tables but for some reason i=6 returns this error;\r\n    Error: Couldn't identify table. Try passing (a different) information to the which argument.\r\n\r\nFor some reason, if i isolate the html for this table and store it in a new file, then htmltab is able to return the table as expected.\r\n\r\nAlso - if i try the below, i can parse the table;\r\n\r\nhtmltab(doc = html.file,which=\"//table[6]\")\r\n\r\nCould you please shed light on why the first syntax I tried fails where as the last seems to be ok?"},"comment":{"url":"https://api.github.com/repos/crubba/htmltab/issues/comments/135768456","html_url":"https://github.com/crubba/htmltab/issues/10#issuecomment-135768456","issue_url":"https://api.github.com/repos/crubba/htmltab/issues/10","id":135768456,"user":{"login":"crubba","id":1366998,"avatar_url":"https://avatars.githubusercontent.com/u/1366998?v=3","gravatar_id":"","url":"https://api.github.com/users/crubba","html_url":"https://github.com/crubba","followers_url":"https://api.github.com/users/crubba/followers","following_url":"https://api.github.com/users/crubba/following{/other_user}","gists_url":"https://api.github.com/users/crubba/gists{/gist_id}","starred_url":"https://api.github.com/users/crubba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crubba/subscriptions","organizations_url":"https://api.github.com/users/crubba/orgs","repos_url":"https://api.github.com/users/crubba/repos","events_url":"https://api.github.com/users/crubba/events{/privacy}","received_events_url":"https://api.github.com/users/crubba/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T13:01:59Z","updated_at":"2015-08-28T13:01:59Z","body":"Hi, \r\ndo you use the CRAN or the github version? Since you mentioned that \"//table[6]\" worked I assume it has to be an older version. I would suggest to try out the most recent version from github, as it appears to render all the tables correctly. \r\n\r\nIn a loop \"table.df <- htmltab(doc = html.file,which=i)\" should now work correctly. As you mentioned the real tables are number 2,4 and 6. I would suggest using a more stable xpath other than the position, maybe based on class, id attribute or number of tr children. And please note, that which = \"//table[6]\" doesn't necessarily identify the same table as which = 6, since tables can be nested. "}}