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

Namespace ns0 generated in each node and field.

Hi EveryBody,

I have a file to file scenario in which i am using XSDs for both source and target.

Below is my target payload generated:

?xml version="1.0" encoding="UTF-8"?>

http://www.xyz.com/schemas">

<ns0:Header>

<ns0:SH1>

<ns0:Ck>345</ns0:Ck>

<ns0:Sa>MDM</ns0:Sa>

<ns0:T>20070924100953</ns0:T>

</ns0:SH1>

<ns0:SH2>

<ns0:FI>606</ns0:FI>

<ns0:FN>YYZ</ns0:FN>

</ns0:SH2>

</ns0:Header>

</ns0:Business>

The required Payload is :

?xml version="1.0" encoding="UTF-8"?>

http://www.xyz.com/schemas">

<Header>

<SH1>

<Ck>345</Ck>

<Sa>MDM</Sa>

<T>20070924100953</T>

</SH1>

<SH2>

<FI>606</FI>

<FN>YYZ</FN>

</SH2>

</Header>

</Business>

When we observe the above payloads we see namespace prefix <b>ns0:</b> is appearing in the first payload.Can anybody help me to remove <b>ns0:</b> from the payload.

Regards,

Zabiulla

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 21, 2007 at 05:18 AM

    try these methods;

    Remove namespace prefix

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

    From MT -

    /people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 21, 2007 at 09:22 AM

    Both XML representations are the same, so you need not do anything special.

    The receiver should be able to accept both.

    Regards

    Stefan

    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.