Skip to content

Commit

Permalink
More removing the liberal xml parser
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham committed Jul 12, 2009
1 parent ed86efa commit b2692fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 125 deletions.
11 changes: 3 additions & 8 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#RELEASE remove
sys.path.insert(0,os.path.abspath(os.path.join(__file__,'../src')))
#END RELEASE
from html5lib import html5parser, liberalxmlparser, sanitizer
from html5lib import html5parser, sanitizer
from html5lib.tokenizer import HTMLTokenizer
from html5lib import treebuilders, serializer, treewalkers
from html5lib import constants
Expand Down Expand Up @@ -52,10 +52,8 @@ def parse():
else:
tokenizer = HTMLTokenizer

if opts.liberalxml:
p = liberalxmlparser.XHTMLParser(tree=treebuilder, tokenizer=tokenizer)
else:
p = html5parser.HTMLParser(tree=treebuilder, tokenizer=tokenizer)

p = html5parser.HTMLParser(tree=treebuilder, tokenizer=tokenizer)

if opts.fragment:
parseMethod = p.parseFragment
Expand Down Expand Up @@ -196,9 +194,6 @@ def getOptParser():
parser.add_option("", "--sanitize", action="store_true", default=False,
dest="sanitize", help="sanitize")

parser.add_option("", "--liberal-xml-parser", action="store_true", default=False,
dest="liberalxml", help="parse with liberal xml parser")

return parser

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions src/html5lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@
from html5parser import HTMLParser, parse
from treebuilders import getTreeBuilder
from serializer import serialize

from liberalxmlparser import XMLParser, XHTMLParser
115 changes: 0 additions & 115 deletions tests/test_sax.py

This file was deleted.

0 comments on commit b2692fe

Please sign in to comment.