From 5fb5a9564741d4351fde8d828a6fd1944734807d Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Wed, 25 Jan 2023 15:07:21 -0500 Subject: Removed very copy of the code that was imported as part of the bzr import but not removed. --- src/beautifulsoup/builder/lxml_builder.py | 36 ------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/beautifulsoup/builder/lxml_builder.py (limited to 'src/beautifulsoup/builder/lxml_builder.py') diff --git a/src/beautifulsoup/builder/lxml_builder.py b/src/beautifulsoup/builder/lxml_builder.py deleted file mode 100644 index 3e1de5f..0000000 --- a/src/beautifulsoup/builder/lxml_builder.py +++ /dev/null @@ -1,36 +0,0 @@ -from lxml import etree -from beautifulsoup.element import Comment -from beautifulsoup.builder import HTMLTreeBuilder - -class LXMLTreeBuilder(HTMLTreeBuilder): - - def __init__(self, parser_class=etree.HTMLParser): - self.parser = parser_class(target=self) - self.soup = None - - def feed(self, markup): - self.parser.feed(markup) - self.parser.close() - - def close(self): - pass - - def start(self, name, attrs): - self.soup.handle_starttag(name, attrs) - - def end(self, name): - self.soup.handle_endtag(name) - - def data(self, content): - self.soup.handle_data(content) - - def comment(self, content): - "Handle comments as Comment objects." - self.soup.endData() - self.soup.handle_data(content) - self.soup.endData(Comment) - - def test_fragment_to_document(self, fragment): - """See `TreeBuilder`.""" - return u'%s' % fragment - -- cgit v1.2.3