I got a requirement to produce an output messages with namespace prefix on all nodes.
Could someone please help me?
My problem is that after mapping in BizTalk, the output message has inline namespace.
For example, I expect:
<ns0:root xmlns:ns0="http://www.domain1.com" xmlns:domain2="http://www.domain2.com">
<domain2:element1>abc</domain2:element1>
<ns0:element2>abc</ns0:element2>
</ns0:root>
But it was:
<root xmlns="http://www.domain1.com">
<element1 xmlns="http://www.domain2.com">abc</element1>
<element2 xmlns="http://www.domain1.com">abc</element2>
</root>
The namespace aliases ns0, domain2 are not important to me.
Both of these Xml are same, it does not matter if prefix is used or not as good as Xml elements belong to the namespace as per defined scheme. Its not a valid requirement to request xml with specific prefix. Even if you need to do it, use custom Xslt.