cancel
Showing results for 
Search instead for 
Did you mean: 

Namespace ns0 generated in each node and field.

Former Member
0 Kudos

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

<ns0:Business xmlns:ns0="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"?>

<Business xmlns="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

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

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

The receiver should be able to accept both.

Regards

Stefan