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 _set(self, key, value): tree = self._getTree() if tree is not None: key = TX.xmlAttrName2PyAttrName(key) tree.set(key, ` value `)
def _set(self, key, value): tree = self._getTree() if tree is not None: key = TX.xmlAttrName2PyAttrName(key) tree.set(key, `value`)