public static List<Element> findElementByWsuId(Document doc,String id){
  String xpath=String.format("//attribute::*[local-name()='Id' and namespace-uri()='%s' and string()='%s']/parent::node()",URI_NS_WSU,id);
  List<Element> result=new ArrayList<Element>();
  try {
    result=(List<Element>)evaluateXPath(doc,xpath);
    LOG.trace(String.format("### WSU IDs found ### \n%s",nodelistToFastXPathList(result)));
  }
 catch (  XPathExpressionException e) {
    LOG.warn(String.format("BAD XPath: %s",xpath));
  }
 finally {
  }
  return result;
}

public static List < Element > findElementByWsuId ( Document doc , String id ) { String xpath = String . format ( "//attribute::*[local-name()='Id' and namespace-uri()='%s' and string()='%s']/parent::node()" , URI_NS_WSU , id ) ; List < Element > result = new ArrayList < Element > ( ) ; try { result = ( List < Element > ) evaluateXPath ( doc , xpath ) ; LOG . trace ( String . format ( "### WSU IDs found ### \n%s" , nodelistToFastXPathList ( result ) ) ) ; } catch ( XPathExpressionException e ) { LOG . warn ( String . format ( "BAD XPath: %s" , xpath ) ) ; } finally { } return result ; }
finds an element by its id name . looks for wsu : id .
