private String attr(String name,Element element){
  String res=text(element,"@" + name);
  int i=name.indexOf(':');
  if (res.length() == 0 && i >= 0) {
    return attr(name.substring(i + 1),element);
  }
  return res;
}

private String attr ( String name , Element element ) { String res = text ( element , "@" + name ) ; int i = name . indexOf ( ':' ) ; if ( res . length ( ) == 0 && i >= 0 ) { return attr ( name . substring ( i + 1 ) , element ) ; } return res ; }
extracts an attribute by name . returns empty string if attribute was not found . if the attr name is prefixed and not found , an attempt is made to find it without prefix
