if (secureTag.equalsIgnoreCase("")) {
checkEncryptionAlgorithm(keyEncryptionKey, encodedDocument.getDocumentElement());
encodedDocument = xmlCipher.doFinal(encodedDocument, encodedDocument.getDocumentElement());
} else {
XPathBuilder xpathBuilder = new XPathBuilder(secureTag);
xpathBuilder.setNamespaceContext(getNamespaceContext());
NodeList nodeList = xpathBuilder.evaluate(exchange, NodeList.class);
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
encodedDocument = node.getOwnerDocument();