Esempio 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({}, {})
Esempio n. 2
0
File: sax.py Progetto: 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({}, {})