Question about XMLport with repeated attributes

northerner
Member Posts: 67
I am creating an XMLport which must generate XML with fields like this:
The 'xsi:type' is added to the XMLport as an attribute. Currently I've got it set as 'source type' = text, and 'data source' of xsdstring. In the OnInitXMLport trigger, there's a line of code assigning a value to the field:
The problem is when I try to save the XMLport, I get an error message saying that
Because the value is used many times, I don't want to declare and assign 'xsdstring1', 'xsdstring2', etc. I also don't have / need the value in a table, so don't really want to create a new table to store the value. What's the best way of doing this?
Many thanks in advance!
<firstName xsi:type="xsd:string"/>
<lastName xsi:type="xsd:string"/>
<company xsi:type="xsd:string"/>
The 'xsi:type' is added to the XMLport as an attribute. Currently I've got it set as 'source type' = text, and 'data source' of xsdstring. In the OnInitXMLport trigger, there's a line of code assigning a value to the field:
xsdstring := 'xsd:string';
The problem is when I try to save the XMLport, I get an error message saying that
Microsoft Dynamics NAV Classic
The variable XSDSTRING is defined more than once.
An example could be: 'File' exists as both a data type and a global variable.
OK
Because the value is used many times, I don't want to declare and assign 'xsdstring1', 'xsdstring2', etc. I also don't have / need the value in a table, so don't really want to create a new table to store the value. What's the best way of doing this?
Many thanks in advance!
0
Comments
-
xmlport can't handle namespaces. You'll have to use MSxmldom to generate the xml file.
You can create the xml file first with xmlport without the namespaces and then add it with msxmldom0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions