public static XMLObject unmarshallSAMLObj(Document document) throws UnmarshallingException, ConfigurationException {
  Validate.notNull(document);
  Element root=document.getDocumentElement();
  UnmarshallerFactory unmarshallerFactory=Configuration.getUnmarshallerFactory();
  Unmarshaller unmarshaller=unmarshallerFactory.getUnmarshaller(root);
  XMLObject obj=unmarshaller.unmarshall(root);
  return obj;
}

public static XMLObject unmarshallSAMLObj ( Document document ) throws UnmarshallingException , ConfigurationException { Validate . notNull ( document ) ; Element root = document . getDocumentElement ( ) ; UnmarshallerFactory unmarshallerFactory = Configuration . getUnmarshallerFactory ( ) ; Unmarshaller unmarshaller = unmarshallerFactory . getUnmarshaller ( root ) ; XMLObject obj = unmarshaller . unmarshall ( root ) ; return obj ; }
unmarshall dom object to opensaml xmlobject .
