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
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
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
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