def METHOD_NAME(self, name, attrs):
    self.stack.append(name)
    for w in self.watch:
        if '/'.join(self.stack) == w:
            self.watch[w]['collecting'] = True
            self.watch[w]['content'] = ''
    for w in self.watch:
        if self.watch[w]['collecting']:
            self.watch[w]['content'] += '<{}{}>'.format(name, ''.join(map(lambda x: ' {}="{}"'.format(x[0], x[1]), attrs.items())))