code: def getattr(self, key, default=None, callback=None):
          u
          value = self._xml.text if key == 'text' else self._xml.get(key, default)
          return callback(value) if callback else value
docs: u"""Getting the attribute of an element.
  
          >>> xml = etree.Element('root')
          >>> xml.text = 'text'
          >>> Node(xml).getattr('text')
          'text'
          >>> Node(xml).getattr('text', callback=str.upper)
          'TEXT'
          >>> Node(xml).getattr('wrong_attr', default='default')
          'default'