summaryrefslogtreecommitdiff
path: root/beautifulsoup/builder/_lxml.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 19:25:15 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 19:25:15 -0500
commit39a2b266b634aa2eca4329a6719e090087113f46 (patch)
tree37b6acc1acb65ef99c1c0dbe93caf06934818000 /beautifulsoup/builder/_lxml.py
parent2f0b16b8ea82b09034dff0e747e29d89e97b5680 (diff)
Added tests for the default builder registry.
Diffstat (limited to 'beautifulsoup/builder/_lxml.py')
-rw-r--r--beautifulsoup/builder/_lxml.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/beautifulsoup/builder/_lxml.py b/beautifulsoup/builder/_lxml.py
index f5cc242..4c7a826 100644
--- a/beautifulsoup/builder/_lxml.py
+++ b/beautifulsoup/builder/_lxml.py
@@ -9,15 +9,19 @@ from beautifulsoup.builder import (
FAST,
HTML,
HTMLTreeBuilder,
+ PERMISSIVE,
TreeBuilder,
XML)
from beautifulsoup.dammit import UnicodeDammit
import types
+LXML = 'lxml'
+
class LXMLTreeBuilderForXML(TreeBuilder):
DEFAULT_PARSER_CLASS = etree.XMLParser
- features = [FAST, XML]
+ # Well, it's permissive by XML parser standards.
+ features = [LXML, XML, FAST, PERMISSIVE]
@property
def default_parser(self):
@@ -86,7 +90,7 @@ class LXMLTreeBuilderForXML(TreeBuilder):
class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
- features = [FAST, HTML]
+ features = [LXML, HTML, FAST]
@property
def default_parser(self):