Xmlport and Namespace prefix

sanojsanoj Member Posts: 19
edited 2012-08-27 in NAV Three Tier
Hi,

I'm trying to produce a xml root-tag that looks as follows:
<ns0:OrderMessage xmlns:ns0="http://Order_v01"&gt;

I'm using xmlport and the RTC-client.

I have tried adding the namespace as an attibute but then it gets really screwed up.
I get this result:

<OrderMessage xmlns="ns0" xmlns:ns0="http://Order_v01"&gt;

Is it possible to solve this? If not, can I use xslt to handle it?

Br, Jonas

Comments

  • ddlarscddlarsc Member, Microsoft Employee Posts: 19
    Try to use the XmlPort properties UseDefaultNamespace and DefaultNameSpace

    If you need to use multi namespaces in the xmport output you may need to parse it though a DotNet XmlDom in a codeunit.

    Below are a couple of links when working with xmlport and namespa
    ces
    viewtopic.php?f=23&t=5655&start=0
    viewtopic.php?t=16627
    “This posting is provided "AS IS" with no warranties, and confers no rights.”

    Lars-Bo Christensen
    Software Developer @ Microsoft
Sign In or Register to comment.