private static Node getXmlSignatureInsertLocation ( final Element elem ) { val nodeListExtensions = elem . getElementsByTagNameNS ( SAMLConstants . SAML20P_NS , "Extensions" ) ; if ( nodeListExtensions . getLength ( ) != 0 ) { return nodeListExtensions . item ( nodeListExtensions . getLength ( ) - 1 ) ; } val nodeListStatus = elem . getElementsByTagNameNS ( SAMLConstants . SAML20P_NS , "Status" ) ; return nodeListStatus . item ( nodeListStatus . getLength ( ) - 1 ) ; }
Gets the xml signature insert location .