Genshi XPath is very limited and doesn't allow to do such things as selecting an empty row in a table. This recipe shows how to select and remove HTML elements using regular expressions in Transformers. {{{ #!python from genshi.input import HTML from genshi.filters.transform import Transformer, StreamBuffer import re html2 = HTML('''
not empty |
---|