protected void parseDOMElement(Element element) throws SAML2Exception {
  AssertionFactory assertionFactory=AssertionFactory.getInstance();
  ProtocolFactory protoFactory=ProtocolFactory.getInstance();
  requestId=element.getAttribute(SAML2Constants.ID);
  validateID(requestId);
  version=element.getAttribute(SAML2Constants.VERSION);
  validateVersion(version);
  String issueInstantStr=element.getAttribute(SAML2Constants.ISSUE_INSTANT);
  validateIssueInstant(issueInstantStr);
  destinationURI=element.getAttribute(SAML2Constants.DESTINATION);
  consent=element.getAttribute(SAML2Constants.CONSENT);
  NodeList nList=element.getChildNodes();
  if ((nList != null) && (nList.getLength() > 0)) {
    for (int i=0; i < nList.getLength(); i++) {
      Node childNode=nList.item(i);
      String cName=childNode.getLocalName();
      if (cName != null) {
        if (cName.equals(SAML2Constants.ISSUER)) {
          validateIssuer();
          nameID=assertionFactory.createIssuer((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.SIGNATURE)) {
          validateSignature();
          signatureString=XMLUtils.print((Element)childNode);
          isSigned=true;
        }
 else         if (cName.equals(SAML2Constants.EXTENSIONS)) {
          validateExtensions();
          extensions=protoFactory.createExtensions((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.SUBJECT)) {
          validateSubject();
          subject=assertionFactory.createSubject((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.NAMEIDPOLICY)) {
          validateNameIDPolicy();
          nameIDPolicy=protoFactory.createNameIDPolicy((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.CONDITIONS)) {
          validateConditions();
          conditions=assertionFactory.createConditions((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.REQ_AUTHN_CONTEXT)) {
          validateReqAuthnContext();
          reqAuthnContext=protoFactory.createRequestedAuthnContext((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.SCOPING)) {
          validateScoping();
          scoping=protoFactory.createScoping((Element)childNode);
        }
      }
    }
  }
  String forceAuthnAttr=element.getAttribute(SAML2Constants.FORCEAUTHN);
  if ((forceAuthnAttr != null) && (forceAuthnAttr.length() > 0)) {
    forceAuthn=SAML2SDKUtils.booleanValueOf(forceAuthnAttr);
  }
  String isPassiveAttr=element.getAttribute(SAML2Constants.ISPASSIVE);
  if ((isPassiveAttr != null) && (isPassiveAttr.length() > 0)) {
    isPassive=SAML2SDKUtils.booleanValueOf(isPassiveAttr);
  }
  protocolBinding=element.getAttribute(SAML2Constants.PROTOBINDING);
  String index=element.getAttribute(SAML2Constants.ASSERTION_CONSUMER_SVC_INDEX);
  if ((index != null) && (index.length() > 0)) {
    assertionConsumerSvcIndex=new Integer(index);
    validateAssertionConsumerServiceIndex(assertionConsumerSvcIndex);
  }
  assertionConsumerServiceURL=XMLUtils.unescapeSpecialCharacters(element.getAttribute(SAML2Constants.ASSERTION_CONSUMER_SVC_URL));
  index=element.getAttribute(SAML2Constants.ATTR_CONSUMING_SVC_INDEX);
  if ((index != null) && (index.length() > 0)) {
    attrConsumingSvcIndex=new Integer(index);
    validateAttributeConsumingServiceIndex(attrConsumingSvcIndex);
  }
  providerName=element.getAttribute(SAML2Constants.PROVIDER_NAME);
}

protected void parseDOMElement ( Element element ) throws SAML2Exception { AssertionFactory assertionFactory = AssertionFactory . getInstance ( ) ; ProtocolFactory protoFactory = ProtocolFactory . getInstance ( ) ; requestId = element . getAttribute ( SAML2Constants . ID ) ; validateID ( requestId ) ; version = element . getAttribute ( SAML2Constants . VERSION ) ; validateVersion ( version ) ; String issueInstantStr = element . getAttribute ( SAML2Constants . ISSUE_INSTANT ) ; validateIssueInstant ( issueInstantStr ) ; destinationURI = element . getAttribute ( SAML2Constants . DESTINATION ) ; consent = element . getAttribute ( SAML2Constants . CONSENT ) ; NodeList nList = element . getChildNodes ( ) ; if ( ( nList != null ) && ( nList . getLength ( ) > 0 ) ) { for ( int i = 0 ; i < nList . getLength ( ) ; i ++ ) { Node childNode = nList . item ( i ) ; String cName = childNode . getLocalName ( ) ; if ( cName != null ) { if ( cName . equals ( SAML2Constants . ISSUER ) ) { validateIssuer ( ) ; nameID = assertionFactory . createIssuer ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . SIGNATURE ) ) { validateSignature ( ) ; signatureString = XMLUtils . print ( ( Element ) childNode ) ; isSigned = true ; } else if ( cName . equals ( SAML2Constants . EXTENSIONS ) ) { validateExtensions ( ) ; extensions = protoFactory . createExtensions ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . SUBJECT ) ) { validateSubject ( ) ; subject = assertionFactory . createSubject ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . NAMEIDPOLICY ) ) { validateNameIDPolicy ( ) ; nameIDPolicy = protoFactory . createNameIDPolicy ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . CONDITIONS ) ) { validateConditions ( ) ; conditions = assertionFactory . createConditions ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . REQ_AUTHN_CONTEXT ) ) { validateReqAuthnContext ( ) ; reqAuthnContext = protoFactory . createRequestedAuthnContext ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . SCOPING ) ) { validateScoping ( ) ; scoping = protoFactory . createScoping ( ( Element ) childNode ) ; } } } } String forceAuthnAttr = element . getAttribute ( SAML2Constants . FORCEAUTHN ) ; if ( ( forceAuthnAttr != null ) && ( forceAuthnAttr . length ( ) > 0 ) ) { forceAuthn = SAML2SDKUtils . booleanValueOf ( forceAuthnAttr ) ; } String isPassiveAttr = element . getAttribute ( SAML2Constants . ISPASSIVE ) ; if ( ( isPassiveAttr != null ) && ( isPassiveAttr . length ( ) > 0 ) ) { isPassive = SAML2SDKUtils . booleanValueOf ( isPassiveAttr ) ; } protocolBinding = element . getAttribute ( SAML2Constants . PROTOBINDING ) ; String index = element . getAttribute ( SAML2Constants . ASSERTION_CONSUMER_SVC_INDEX ) ; if ( ( index != null ) && ( index . length ( ) > 0 ) ) { assertionConsumerSvcIndex = new Integer ( index ) ; validateAssertionConsumerServiceIndex ( assertionConsumerSvcIndex ) ; } assertionConsumerServiceURL = XMLUtils . unescapeSpecialCharacters ( element . getAttribute ( SAML2Constants . ASSERTION_CONSUMER_SVC_URL ) ) ; index = element . getAttribute ( SAML2Constants . ATTR_CONSUMING_SVC_INDEX ) ; if ( ( index != null ) && ( index . length ( ) > 0 ) ) { attrConsumingSvcIndex = new Integer ( index ) ; validateAttributeConsumingServiceIndex ( attrConsumingSvcIndex ) ; } providerName = element . getAttribute ( SAML2Constants . PROVIDER_NAME ) ; }
parses the docuemnt element for this object .
