try
...,
load_structure('C:/example.html', DOM, [])
forall(xpath(DOM, //table, TB), use_table(TB)),
...
use_table/1 should not fail, or the entire loop will fail as well.
edit: to collect all tables:
findall(TB, xpath(DOM, //table, TB), Tables)