}
if (omPath == null){
throw new SynapseException("Please specify the XPath to the base64 element");
}else{
AXIOMXPath xp;
try {
xp = new AXIOMXPath(omPath.getText());
OMElementUtils.addNameSpaces(xp, elem, log);
if(omNS != null){
String prefix = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "prefix"));
String name = omNS.getAttributeValue(new QName(Constants.NULL_NAMESPACE, "name"));
xp.addNamespace(prefix,name);
}
mediator.setAttachmentPath(xp);
} catch (JaxenException e) {
log.error("Error creating XPath for Base64 element", e);