Drop libxml2 dependency

It seems that Python's internal XML parser is good enough to do the job.
This commit is contained in:
James R. Barlow
2015-08-17 15:26:07 -07:00
parent 53c88093ad
commit 2dff3e07ce
4 changed files with 7 additions and 5 deletions
+2 -3
View File
@@ -9,7 +9,7 @@
##############################################################################
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.units import inch
from lxml import etree as ElementTree
from xml.etree import ElementTree
from PIL import Image
from collections import namedtuple
import re
@@ -35,8 +35,7 @@ class HocrTransform():
self.dpi = dpi
self.boxPattern = re.compile(r'bbox((\s+\d+){4})')
self.hocr = ElementTree.ElementTree()
self.hocr.parse(hocrFileName)
self.hocr = ElementTree.parse(hocrFileName)
# if the hOCR file has a namespace, ElementTree requires its use to
# find elements