tagname = None
# from nose.tools import set_trace
- if isinstance(element, etree._Comment): return None
-
if element.tag[0] == '{':
for nshort, nhref in element.nsmap.items():
try:
if element is None: return None # end of tree
def _handle_element(self, element):
+ if isinstance(element, etree._Comment): return None
+
handler = self._handle_for_element(element)
# How many scopes
try:
if handler is None:
pre = [self.filter_text(element.text)]
- post = []
+ post = [self.filter_text(element.tail)]
else:
vals = handler(element)
# depending on number of returned values, vals can be None, a value, or a tuple.