The .xml file created by xfa.host.exportData("",0) failes to validate due to the presence of empty tags when submitting.
Below is a sample.......
The empty tags represent optional fields on my form. i.e TwoDoorPassengerVolumeMeasure is not required in some submissions.
How can remove these before generating this file?
Thanks in advance!!
<?xml version="1.0" encoding="UTF-8" ?>
- <v:CarlineSubmission xmlns:v="https://rrevm-veerr.ss.ec.gc.ca/">
Has your XML Schema got the minOccurs="0" for the TwoDoorPassengerVolumeMeasure element? If it has there should be a dd:nullType="exclude" attribute added to the dataDescription section of your form (you should be able to find it in the XML Source view). It sometimes doesn't get added but as far as I know only if the minOccurs is on a complex type, so you would then have to add it manually (we use a macro but it is quite specific to our style of XML Schema).
There is more about the nullType attribute at John Brinkman's blog http://blogs.adobe.com/formfeed/2009/12/null_data_handling.html.