Hi
I have an xmlport that creates an xml-file with Service Invoices. The file must have multipla namespaces. How do I do that? Can I create it an then add the namespaces with a function like there is functions to remove namespaces when importing xml-files?
/Anna
0
Answers
If you can just add a row to the XMLport...
Below the root element you would do something like this.
(or do multiple with different Name and Data Source)
Node Name Node Type Source Type Data Source
xmlns:ns1 Attribute Text <xmlns:ns1>
Then in code with the trigger(s):
xmlns:ns1 - Export::OnBeforePassVariable():
Set the correct namespace:
"xmlns:ns1" := ('http://www.w3.org/2001/XMLSchema-instance');
UseDefaultNamespace & DefaultNamespace are XMLport properties.
Which you can set design time.
Hope that helps...
In the property sheet please change the variable name to exclude the (:) colon,
https://ksdconsultancy.blog/2015/10/13/multiple-namespace-support-in-xml-ports-microsoft-dynamics-nav-2016/