What data are you trying to extract? Is it all of the answers for a given response, or answers to a specific question?
To load a specific response, you can follow the following steps, though you'll need to know the response guid.
*Caveat: I haven't built and tested this code...
Code://Get a response template ResponseTemplate rt = ResponseTemplateManager.GetResponseTemplateFromResponseGUID(responseGuid); //Create a response Response r = rt.CreateResponse(languageCode); //Language code most likely = en-US //Load the response r.Restore(responseGuid); //Loop and get answers ReadOnlyCollectionresponsePages = r.RespronsePages foreach(ResponsePage page in responsePages) { List - items = page.Items foreach(Item item in items) { if(item is IAnswerable) { //Get answer text string answer = ((IAnswerable)item).GetAnswer(); //Get item and answer in XML format string itemXml = item.ToString("xml"); } } }
...answers when you need them





LinkBack URL
About LinkBacks
Reply With Quote



