cancel
Showing results for 
Search instead for 
Did you mean: 

Remove ns0 without affecting namespace

Former Member
0 Kudos

Hi Gurus,

Have a Idoc to File scenerio.

The file generated after mapping is

Eg:

<ns0:Document xmlns="urn:iso:std:iso:camt">

<tag0>data0</tag0>

<tag1>data1</tag1>

.

.

<ns0:Document>

My requirement is to remove ns0 from the root element "Document" so output is in format(namespace is not affected):

<Document xmlns="urn:iso:std:iso:camt">

<tag0>data0</tag0>

<tag1>data1</tag1>

.

.

<Document>

If i remove the targetNameSpace from my xsd ,the namespace is not displayed in the output.But as per my requirement the namespace should be displayed.

Please let me know if there is any alternative solution or code(XSLT or Java) which can give the required output.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Amit,

I think you can do it with XMLAnonymizerBean module in adapter module parameter tab:

You use this module to anonymize XML elements and attributes by removing namespaces or namespace prefixes from the XML document of the main payload.

You can define a particular namespace prefix for each namespace. You can also change the encoding attribute of the XML declaration.

Refer the weblog as well as help:

/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm

Thnx

Chirag

Reward Points if it helps.

Edited by: chirag Gohil on Jan 5, 2008 6:07 PM