Can anybody help with this Empty tag issue?
I have one custom table called Customer Info, and I guess that this empty space in the table name is giving me a trouble.
Is there a way to work around this issue?
I'm not quite sure that you've described the problem well enough to obtain a solution?
The MinOccurrs and MaxOccurs properties of an element control how NAV parses an XML document. If it's MinOccurs = Zero and MaxOccurs = Once then a valid XML document can contain the element 0 or 1 times only in the correct structure of the document. That should work for imports as well as exports.
Are you having problems importing data or exporting data? Is it an error that occurs due to invalid XML or during another event (say field level OnValidate trigger)?
hi all,
i am having the same problem here. for example... if i am exporting values in xml. if the field has no value, instead of skipping the xml tag, nav will export </field1>. If it has value it will export <field1>value</field1>.
Is it possible in xmlports to get nav to skip exporting the tags if there is no value? I have tried setting the minoccurs to 0, but it does not help. nav still exports an empty xml tag.
i am thinking the best way would be to remove all empty tag manually via a batch job after the xml file is created by nav. but i am trying to avoid doing this. if this is at all possible to be configured in NAV xmlports.
hi all,
i am having the same problem here. for example... if i am exporting values in xml. if the field has no value, instead of skipping the xml tag, nav will export </field1>. If it has value it will export <field1>value</field1>.
Is it possible in xmlports to get nav to skip exporting the tags if there is no value? I have tried setting the minoccurs to 0, but it does not help. nav still exports an empty xml tag.
i am thinking the best way would be to remove all empty tag manually via a batch job after the xml file is created by nav. but i am trying to avoid doing this. if this is at all possible to be configured in NAV xmlports.
The schema, generated by NAV, defines all complex types as sequences.
When importing a sequence, you can omit trailing emtpy tags, but you cannot do the same with the leading tags, even when they are empty and even when the minOccurs would allow it. You will also discover that you cannot shuffle the elements within the complex type. If you try to import such an xml, you will get an error claiming missing elements, even if the xml does contain the data. Your xml must contain all elements, in the defined order. Those that do not contain any value, not even empty, can be nilled, but must not be omitted.
When exporting an xmlport, I am not aware of any regular way to trigger the nil attribute. NAV does not "know" NULL values, which would be the equivalent of nil or "missing". Maybe you can add it manually within the xmlport design... That should be tricky, since xmlport does not support arbitrary namespaces.
The difference between theory and practice is smaller in theory than it is in practice.
I have to pass the created xml into a codeunit to remove all the xmltags with null value Nd perform other types of text formatting stuff that xmlport does not support
Comments
RIS Plus, LLC
I have one custom table called Customer Info, and I guess that this empty space in the table name is giving me a trouble.
Is there a way to work around this issue?
The MinOccurrs and MaxOccurs properties of an element control how NAV parses an XML document. If it's MinOccurs = Zero and MaxOccurs = Once then a valid XML document can contain the element 0 or 1 times only in the correct structure of the document. That should work for imports as well as exports.
Are you having problems importing data or exporting data? Is it an error that occurs due to invalid XML or during another event (say field level OnValidate trigger)?
Epimatic Corp.
http://www.epimatic.com
i am having the same problem here. for example... if i am exporting values in xml. if the field has no value, instead of skipping the xml tag, nav will export </field1>. If it has value it will export <field1>value</field1>.
Is it possible in xmlports to get nav to skip exporting the tags if there is no value? I have tried setting the minoccurs to 0, but it does not help. nav still exports an empty xml tag.
i am thinking the best way would be to remove all empty tag manually via a batch job after the xml file is created by nav. but i am trying to avoid doing this. if this is at all possible to be configured in NAV xmlports.
The schema, generated by NAV, defines all complex types as sequences.
When importing a sequence, you can omit trailing emtpy tags, but you cannot do the same with the leading tags, even when they are empty and even when the minOccurs would allow it. You will also discover that you cannot shuffle the elements within the complex type. If you try to import such an xml, you will get an error claiming missing elements, even if the xml does contain the data. Your xml must contain all elements, in the defined order. Those that do not contain any value, not even empty, can be nilled, but must not be omitted.
When exporting an xmlport, I am not aware of any regular way to trigger the nil attribute. NAV does not "know" NULL values, which would be the equivalent of nil or "missing". Maybe you can add it manually within the xmlport design... That should be tricky, since xmlport does not support arbitrary namespaces.