cancel
Showing results for 
Search instead for 
Did you mean: 

XML File Format: removing tag ns0

Former Member
0 Kudos

we are sending XML file through PI. In the file format there was need to add xmlns attribute to root element. Also file we are using is of mxml type. So, target namespace was added in xsd. But with this change, every element is having tag "<ns0:". Can anybody tell me the solution to remove this tag?

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi,

the "element" is a prefix. You can remove it with [XMLAnonymizerBean|/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean].

Regards,

Udo

Former Member
0 Kudos

Thanks Udo for your reply.

I am using XML Anonymizer. I have done all the settings as per Blog

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

There are no errors. But the prefix of namespace "ns0" is not getting removed. Any help is appreciated

Former Member
0 Kudos

HI Akshya,

The XML Anonymizer bean always works for removing namespace prefix . You just have to take care that ::

1 XMLAnonumizer bean should be the first module in module list in Receiver Adpter.

2. In Accept Namespace row in the value tab Mention the name of the namespace you want to come then Give one space and then enter two single quotes without any space .(BY mistake we forgot to give space or we mention double coat instead of single coat ) .

I think if you will take this care then as mentioned in that blog it will work Last but not the least use the parameter key also as mentioned in the blog .

Regards,

Saurabh

Former Member
0 Kudos

Right, the prefix can be removed or renamed in XMLAnonymizer.

(1) anonymizer.acceptNamespaces = namespace1 if

(2) anonymizer.quote = "

However, I'm using HTTP receiver, the module tab is not even enabled.

How can I achieve this for HTTP?

Answers (3)

Answers (3)

Former Member
0 Kudos

Target namespace cant be removed. The xmlns attribite is required for receiver system.

Former Member
0 Kudos

Hi.

if you need to remove . Tyr to use a java mapping or XSLT mapping.

Former Member
0 Kudos

Hi,

If it is required use a namespace, You must not remove the prefix "<n0:" because it is a short name of the complete namespace define in the header level. If you delete it, the xml would be an invalid file.

Regards

Ivan

Former Member
0 Kudos

Hi ,

Remove the Namespace in the XML namespace in Message Type

Regards,

Jude

former_member187339
Active Contributor
0 Kudos

This message was moderated.