summaryrefslogtreecommitdiff
path: root/beautifulsoup/builder/_lxml.py
diff options
context:
space:
mode:
Diffstat (limited to 'beautifulsoup/builder/_lxml.py')
-rw-r--r--beautifulsoup/builder/_lxml.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/beautifulsoup/builder/_lxml.py b/beautifulsoup/builder/_lxml.py
index c2f368c..f5cc242 100644
--- a/beautifulsoup/builder/_lxml.py
+++ b/beautifulsoup/builder/_lxml.py
@@ -5,13 +5,20 @@ __all__ = [
from lxml import etree
from beautifulsoup.element import Comment, Doctype
-from beautifulsoup.builder import TreeBuilder, HTMLTreeBuilder
+from beautifulsoup.builder import (
+ FAST,
+ HTML,
+ HTMLTreeBuilder,
+ TreeBuilder,
+ XML)
from beautifulsoup.dammit import UnicodeDammit
import types
class LXMLTreeBuilderForXML(TreeBuilder):
DEFAULT_PARSER_CLASS = etree.XMLParser
+ features = [FAST, XML]
+
@property
def default_parser(self):
# This can either return a parser object or a class, which
@@ -79,6 +86,8 @@ class LXMLTreeBuilderForXML(TreeBuilder):
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
+ features = [FAST, HTML]
+
@property
def default_parser(self):
return etree.HTMLParser