public static Element createElementInEncryptionSpace(Document doc,String elementName){
  if (doc == null) {
    throw new RuntimeException("Document is null");
  }
  if ((xencPrefix == null) || (xencPrefix.length() == 0)) {
    return doc.createElementNS(EncryptionConstants.EncryptionSpecNS,elementName);
  }
  return doc.createElementNS(EncryptionConstants.EncryptionSpecNS,xencPrefix + ":" + elementName);
}

public static Element createElementInEncryptionSpace ( Document doc , String elementName ) { if ( doc == null ) { throw new RuntimeException ( "Document is null" ) ; } if ( ( xencPrefix == null ) || ( xencPrefix . length ( ) == 0 ) ) { return doc . createElementNS ( EncryptionConstants . EncryptionSpecNS , elementName ) ; } return doc . createElementNS ( EncryptionConstants . EncryptionSpecNS , xencPrefix + ":" + elementName ) ; }
creates an element in the xml encryption specification namespace .
