Wednesday, February 4, 2009

WebSphere Integration Developer BOXMLSerializer writewithOptions

Hi;

The default BOXMLSerializer writes XML with spaces and tabs; to remove tabs/spaces you can use below code.

BOXMLSerializer bos = (BOXMLSerializer) ServiceManager.INSTANCE.locateService
("com/ibm/websphere/bo/BOXMLSerializer");

Map options = new HashMap(); options.put
(XMLResource.OPTION_FORMATTED, Boolean.FALSE);

bos.writeDataObjectWithOptions(dataObject, targetNamespace, element, options);

No comments:

Post a Comment