public static List<Attr> findAttributeByValue(Document doc,String attributeValue){
  List<Attr> returnedElements=new ArrayList<Attr>();
  String xpath=String.format("//attribute::*[string()='%s']",attributeValue);
  try {
    returnedElements=(List<Attr>)evaluateXPath(doc,xpath);
    LOG.trace(String.format("### Element with Attribute '%s' ### \n%s",attributeValue,nodelistToFastXPathList(returnedElements)));
  }
 catch (  XPathExpressionException e) {
    LOG.warn(String.format("BAD XPATH: %s",xpath));
  }
  return returnedElements;
}

public static List < Attr > findAttributeByValue ( Document doc , String attributeValue ) { List < Attr > returnedElements = new ArrayList < Attr > ( ) ; String xpath = String . format ( "//attribute::*[string()='%s']" , attributeValue ) ; try { returnedElements = ( List < Attr > ) evaluateXPath ( doc , xpath ) ; LOG . trace ( String . format ( "### Element with Attribute '%s' ### \n%s" , attributeValue , nodelistToFastXPathList ( returnedElements ) ) ) ; } catch ( XPathExpressionException e ) { LOG . warn ( String . format ( "BAD XPATH: %s" , xpath ) ) ; } return returnedElements ; }
finds an element by its id name . looks for wsu : id .
