* Get the KeyValue object from the KeyInfo DOM element if it exists
*/
private KeyValue getKeyValue(
Element keyInfoElement
) throws MarshalException {
XMLStructure keyInfoStructure = new DOMStructure(keyInfoElement);
KeyInfo keyInfo = keyInfoFactory.unmarshalKeyInfo(keyInfoStructure);
List<?> list = keyInfo.getContent();
for (int i = 0; i < list.size(); i++) {
XMLStructure xmlStructure = (XMLStructure) list.get(i);
if (xmlStructure instanceof KeyValue) {
return (KeyValue)xmlStructure;
}
}
return null;