def _extract_nodes(html_tree, filename):
 search_expr = _XPATH_FIND_NODES
 for name in _IGNORE_NODES:
  search_expr += ('[not(ancestor-or-self::%s)]' % name)
 return html_tree.xpath(search_expr)

def _extract_nodes ( html_tree , filename ) : search_expr = _XPATH_FIND_NODES for name in _IGNORE_NODES : search_expr += ( '[not(ancestor-or-self::%s)]' % name ) return html_tree . xpath ( search_expr )
extract all the i18n-able nodes out of a file .