// clear any configured namespaces
syncXmlSplitter.setNamespaces(null);
asyncXmlSplitter.setNamespaces(null);
// configure a global namespace manager
NamespaceManager namespaceManager = muleContext.getRegistry().lookupObject(NamespaceManager.class);
if (namespaceManager == null)
{
namespaceManager = new NamespaceManager();
muleContext.getRegistry().registerObject(MuleProperties.OBJECT_MULE_NAMESPACE_MANAGER, namespaceManager);
}
Map namespaces = new HashMap();
namespaces.put("e", "http://www.example.com");
syncXmlSplitter.setSplitExpression("/e:purchaseOrder/e:items/e:item");
asyncXmlSplitter.setSplitExpression("/e:purchaseOrder/e:items/e:item");
namespaceManager.setNamespaces(namespaces);
// re-init splitters
syncXmlSplitter.initialise();
asyncXmlSplitter.initialise();