Document doc = db.parse(new FileInputStream(f));
NodeList nl = doc.getElementsByTagNameNS(Constants.SignatureSpecNS, "Signature");
XMLSignature sig = new XMLSignature
((Element) nl.item(0), f.toURI().toURL().toString());
KeyInfo ki = sig.getKeyInfo();
KeyValue kv = ki.itemKeyValue(0);
PublicKey pk = kv.getPublicKey();
assertNotNull(pk);
}