Developer Documentation Library > Mobile SDK > Disconnected mobile application reference > Response XML
 
Response XML
The Response XML format is used to send respondent data to the MobileSyncWebService. Response XML can also be synchronized with the mobile application when a project uses sample. The synchronization makes it possible for an interviewer to start interviewing a respondent, and then reassign the sample record to another interviewer.
The Response XML is a simple format that includes FullName, DataType, and response values. The structure is different from the Player XML, that returns the responses in a connected interview. For disconnected interviews, it does not make sense to reuse the Questions XML. The Question XML delivers questions hierarchically, while the Response XML must provide a value for each flattened variable.
When a variable instance is not listed, its value is taken to be NULL, and the value in the target data set is not updated. NULL must be specified as the variable instance value if the data set target already has a variable instance value (for example, because a sample was reassigned to another interviewer for completion), and the client wants to remove the value (for example, because that question went off path). When the sample is reassigned, the Response XML must include all responses up to the current point in the survey. The responses include both the originally collected responses, and any newly collected responses.
All Respondent.Serial values in the Response XML are ignored because the values are eventually assigned a unique value within the target data set when the record is finally transferred to the case data.
System variables must be provided in the Response XML. For more information, see System variables.
Response XML system variables
Respondent.ID
The Response element's ID attribute determines the value of the Respondent.ID field in the target data set. The Responent.ID system variable is ignored when it is included in the Responses XML.
Required?: Do not include
Respondent.Origin
Must always be {Other}.
Required?: Yes
Respondent.Origin.Other
The source software product name.
The variable might be useful during the analysis of multimode studies (to analyze mode specific responses).
Required?: Yes
Respondent.Serial
A unique Respondent.Serial value is allocated when the record is inserted into the target data set. The Responent.Serial system variable is ignored when it is included in the Responses XML.
Required?: Do not include
Respondent.Serial.SourceFile
Required?: Not applicable
DataCollection.BatchID
Required?: Not applicable
DataCollection.BatchName
Required?: Not applicable
DataCollection.CurrentPage
The current page the respondent is answering. The value indicates the number pages that were answered. UNICOM Intelligence Interviewer - Server Admin numbers pages starting with zero (0) for the first page.
Required?: Optional
DataCollection.DataEntryMode
Required?: Not applicable
DataCollection.Debug
Required?: Not applicable
DataCollection.EndQuestion
The last question that was asked before the interview completed or was stopped. The information is useful when a interview is restarted (for example, by another interviewer), and ensures that the interview restarts on the correct question.
Required?: Optional
DataCollection.FinishTime
Specified in UTC as xsd:dateTime.
Required?: Yes
DataCollection.InterviewEngine
The mobile application's interviewing engine version. The information useful when debugging issues. For example, Interviewer Server uses IOM 6.0 or IOM 7.0.
Required?: Optional
DataCollection.InterviewerID
The variable is useful when analyzing interviewer performance.
Required?: Suggested
DataCollection.InterviewerTimeZone
The Microsoft specific value for the interviewer’s time zone. Do not include the variable in the Response XML when the value cannot be calculated.
Required?: Suggested
DataCollection.InterviewMode
Must be set to {Local}.
Required?: Yes
DataCollection.MetadataVersion
Derived from DataCollection.MetadataVersionNumber.
Required?: Do not include
DataCollection.MetadataVersionGUID
Required?: Optional
DataCollection.MetadataVersionNumber
Must be specified as 1:2 in the Question XML and Routing XML (even when it does not work on the URL) to ensure that it can be passed back.
Required?: Suggested
DataCollection.QuotaID
Obsolete
Required?: Do not include
DataCollection.Removed
Allows records to be deleted from the mobile application user interface, but not completely removed from the data.
Required?: Suggested
DataCollection.RespondentTimeZone
Required?: Suggested
DataCollection.RoutingContext
Always Web in the CAPI interviews. The IOM code converts the routing context name to a categorical, and then assigns the categorical to DataCollection.RoutingContext.
Required?: Suggested
DataCollection.SeedValue
Required?: Suggested
DataCollection.ServerTimeZone
Typically set to the InterviewerTimeZone value.
Required?: Do not include
DataCollection.StartTime
Required?: Yes
DataCollection.Status
Required?: Yes
DataCollection.TerminateSignal
Available as part of the Exit item.
Required?: Suggested
DataCollection.Variant
Required?: Do not include
DataCleaning.Note
Required?: Do not include
DataCleaning.ReviewStatus
Required?: Do not include
DataCleaning.Status
Required?: Do not include
Example
<Response ID="Id1">
  <Variable FullName="Age" DataType="Long" Value="16" / >
  <Variable FullName="Gender" DataType="Categorical" Value="{female}" / >
</Response>
The Response XML is never used by itself, but is sent to the server as part of the RespondentData XML and received as part of the SampleData XML. The Response XML is included in both schemas.
Cache file generation
The MobileSyncWebService submit responses back toSyncWebServiceV2 as a package of cache files. TheMobileSyncWebService uses the Value cache to generate cache files.
Cache files contain state information in addition to the survey question responses. Cache files that are generated by MobileSyncWebService contain only response variables. The GenerateCacheSubscription.mrs script demonstrates how to take case data from the UNICOM Intelligence Data Model and generate a cache file that is compatible with the Synchronization Web Service. The MobileSyncWebService uses the same technique when it converts the Response XML to a cache file.
See also
Sample transformation (SampleData XML)
Quota transformation (Quota XML)
Disconnected mobile application reference