Skip to Content
author's profile photo Former Member
Former Member

Remove ns0 without affecting namespace

Hi Gurus,

Have a Idoc to File scenerio.

The file generated after mapping is


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






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">






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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2008 at 11:59 AM

    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:




    Reward Points if it helps.

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.