Ejemplo n.º 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({}, {})
Ejemplo n.º 2
0
Archivo: sax.py Proyecto: 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({}, {})