Mastering Microsoft Dynamics NAV 2016
上QQ阅读APP看书,第一时间看更新

Multiple namespaces on XMLports

In Microsoft Dynamics NAV 2016, you can define multiple namespaces on XMLports that import or export data as XML. This improves the ability to create XMLports that are compatible with XML schemas, which are used by the system that consume or provide the Microsoft Dynamics NAV data.

Note

For those who don't know what namespace is Namespaces are used to distinguish fields and provide uniqueness. The inclusion of namespaces enables parties to tag elements and resolve any ambiguity.

You can define a namespace in the new namespaces property of the XMLport object as shown in the next screenshot.

Each namespace is defined by a prefix and the namespace, which is typically a URI (uniform resource identifier).

You then apply the prefix to specific elements of the XMLport by setting the new NamespacePrefix property:

Multiple namespaces on XMLports

Select the Export option in the request page for the Sales Order Export XML report, and click on OK:

Multiple namespaces on XMLports

You will be prompted with a Save/Open dialog box, as seen in the following screenshot. Just select one option, and follow the steps:

Multiple namespaces on XMLports

The XML file shown in the following screenshot clearly signifies that the different namespaces are assigned to the corresponding data, which can be utilized in the case of conflicts by differentiating elements or attributes within an XML document:

Multiple namespaces on XMLports