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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/beautifulsoup/builder/lxml_builder.py b/beautifulsoup/builder/lxml_builder.py
index 8336ab4..4e83bba 100644
--- a/beautifulsoup/builder/lxml_builder.py
+++ b/beautifulsoup/builder/lxml_builder.py
@@ -5,6 +5,9 @@ from beautifulsoup.builder import HTMLTreeBuilder
class LXMLTreeBuilder(HTMLTreeBuilder):
def __init__(self, parser_class=etree.HTMLParser):
+ # etree.HTMLParser's constructor has an argument strip_cdata,
+ # but it does nothing. CDATA sections will become text when
+ # passed through etree.HTMLParser.
self.parser = parser_class(target=self)
self.soup = None
@@ -21,6 +24,9 @@ class LXMLTreeBuilder(HTMLTreeBuilder):
def end(self, name):
self.soup.handle_endtag(name)
+ def pi(self, target, data):
+ pass
+
def data(self, content):
self.soup.handle_data(content)