summaryrefslogtreecommitdiff
path: root/beautifulsoup/builder/lxml_builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'beautifulsoup/builder/lxml_builder.py')
-rw-r--r--beautifulsoup/builder/lxml_builder.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/beautifulsoup/builder/lxml_builder.py b/beautifulsoup/builder/lxml_builder.py
index 72e5913..5e053b1 100644
--- a/beautifulsoup/builder/lxml_builder.py
+++ b/beautifulsoup/builder/lxml_builder.py
@@ -16,7 +16,9 @@ class LXMLTreeBuilderForXML(TreeBuilder):
# will be instantiated with default arguments.
return etree.XMLParser
- def __init__(self, parser=None):
+ def __init__(self, parser=None, self_closing_tags=None):
+ if self_closing_tags is not None:
+ self.self_closing_tags = set(self_closing_tags)
if parser is None:
# Use the default parser.
parser = self.default_parser