From a16883da6445710fcf69cfcc1842fb6883495b1c Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 20 Feb 2011 08:37:20 -0500 Subject: Tag.is_empty_element is determined dynamically, based on a) whether the builder used to create the tag had an explicit list of empty-element tags, and b) whether the tag actually contains anything. --- beautifulsoup/builder/lxml_builder.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'beautifulsoup/builder/lxml_builder.py') diff --git a/beautifulsoup/builder/lxml_builder.py b/beautifulsoup/builder/lxml_builder.py index 5e053b1..0cc9e51 100644 --- a/beautifulsoup/builder/lxml_builder.py +++ b/beautifulsoup/builder/lxml_builder.py @@ -7,9 +7,6 @@ import types class LXMLTreeBuilderForXML(TreeBuilder): DEFAULT_PARSER_CLASS = etree.XMLParser - preserve_whitespace_tags = set() - self_closing_tags = set() - @property def default_parser(self): # This can either return a parser object or a class, which @@ -55,9 +52,6 @@ class LXMLTreeBuilderForXML(TreeBuilder): def end(self, name): self.soup.endData() completed_tag = self.soup.tagStack[-1] - if len(completed_tag.contents) == 0: - completed_tag.isSelfClosing = True - self.soup.handle_endtag(name) def pi(self, target, data): -- cgit v1.2.3