예제 #1
0
 def __init__(self, element_or_tree, content_handler):
     try:
         element = element_or_tree.getroot()
     except AttributeError:
         element = element_or_tree
     self._element = element
     self._content_handler = content_handler
     from xml.sax.xmlreader import AttributesNSImpl as attr_class
     self._attr_class = attr_class
     self._empty_attributes = attr_class({}, {})
예제 #2
0
파일: sax.py 프로젝트: gwik/lxml
 def __init__(self, element_or_tree, content_handler):
     try:
         element = element_or_tree.getroot()
     except AttributeError:
         element = element_or_tree
     self._element = element
     self._content_handler = content_handler
     from xml.sax.xmlreader import AttributesNSImpl as attr_class
     self._attr_class = attr_class
     self._empty_attributes = attr_class({}, {})