code: def getAttr(self, node, name, nsuri=None, default=join):
          
          if nsuri is None:
              result = node._attrs.get(name, None)
              if result is None:
                  for item in node._attrsNS.keys():
                      if item[1] == name:
                          result = node._attrsNS[item]
                          break
          else:
              result = node._attrsNS.get((nsuri, name), None)
          if result is not None:
              return result.value
          if default is not join:
              return default
          return ''
docs: Return the value of the attribute named 'name' with the
             optional nsuri, or the default if one is specified. If
             nsuri is not specified, an attribute that matches the
             given name will be returned regardless of namespace.