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