Skip navigation
Ken Reed 1
Currently Being Moderated

Issue with xfa.host.exportData("",0)??

Aug 17, 2012 7:53 AM

Tags: #xml

Hello All,

 

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/">

- <v:SubmissionAuthorDetails>

  <v:ManufacturerCode>E97</v:ManufacturerCode>

  <v:ModelYear>2013</v:ModelYear>

  </v:SubmissionAuthorDetails>

- <v:CarlineInformationDetails>

  <v:ManufacturerDivisionCode>1</v:ManufacturerDivisionCode>

  <v:CarlineCode>2</v:CarlineCode>

  <v:CarlineClassCode>2</v:CarlineClassCode>

  <v:FullCarlineName>test</v:FullCarlineName>

- <v:VehicleVolumeMeasureDetails>

  <v:AveragePassengerVolumeMeasure>40.000</v:AveragePassengerVolumeMeas ure>

  <v:AverageLuggageVolumeMeasure>35.000</v:AverageLuggageVolumeMeasure>

  <v:TwoDoorPassengerVolumeMeasure />

  <v:TwoDoorLuggageVolumeMeasure />

  <v:FourDoorPassengerVolumeMeasure />

  <v:FourDoorLuggageVolumeMeasure />

  <v:HatchbackPassengerVolumeMeasure />

  <v:HatchbackLuggageVolumeMeasure />

  </v:VehicleVolumeMeasureDetails>

  </v:CarlineInformationDetails>

  </v:CarlineSubmission>

 

 

 
Replies
  • Currently Being Moderated
    Aug 17, 2012 3:59 PM   in reply to Ken Reed 1

    Hi Ken,

     

    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

     

    Good luck,

     

    Bruce

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points