def remove_empty_tags(self):
        all_nodes = self.parser.getElementsByTags(
            self.get_top_node(), ['*'])
        all_nodes.reverse()
        for el in all_nodes:
            tag = self.parser.getTag(el)
            text = self.parser.getText(el)
            if (tag != 'br' or text != '\\r') \
                    and not text \
                    and len(self.parser.getElementsByTag(
                        el, tag='object')) == 0 \
                    and len(self.parser.getElementsByTag(
                        el, tag='embed')) == 0:
                self.parser.remove(el)
Test parsing an ordinary path
dataset/ETHPy150Open codelucas/newspaper/newspaper/outputformatters.py/OutputFormatter.remove_empty_tags--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/utils/url_test.py/UrlTestCase.test_parse_path