Example #1
0
 def _getAttributes(self):
     attributes = {}
     for index, value in enumerate(self._xpath('@*') or []):
         attrname = TX.xmlAttrName2PyAttrName(
             self._xpath('name(@*[%d])' % (index + 1)))
         attributes[attrname] = TX.xmlValue2PyValue(
             value, self.C.XSL_XMLCONVERSIONS)
     return attributes
Example #2
0
 def _getAttributes(self):
     attributes = {}
     for index, value in enumerate(self._xpath('@*') or []):
         attrname = TX.xmlAttrName2PyAttrName(self._xpath('name(@*[%d])' % (index + 1)))
         attributes[attrname] = TX.xmlValue2PyValue(value, self.C.XSL_XMLCONVERSIONS)
     return attributes
Example #3
0
 def _get(self, key):
     key = TX.pyAttrName2XmlAttrName(key)
     value = self._xpath('@' + key)
     if value:
         return TX.xmlValue2PyValue(value[0], self.C.XSL_XMLCONVERSIONS)
     return None
Example #4
0
 def _get(self, key):
     key = TX.pyAttrName2XmlAttrName(key)
     value = self._xpath('@' + key)
     if value:
         return TX.xmlValue2PyValue(value[0], self.C.XSL_XMLCONVERSIONS)
     return None