Click here to Skip to main content
15,891,734 members
Home / Discussions / C#
   

C#

 
AnswerRe: Auto Update Sql Database Schema Pin
OriginalGriff21-Jan-15 22:07
mveOriginalGriff21-Jan-15 22:07 
QuestionAsp.net Mvc web api Pin
Member 1139320421-Jan-15 19:19
Member 1139320421-Jan-15 19:19 
AnswerRe: Asp.net Mvc web api Pin
Richard MacCutchan21-Jan-15 21:10
mveRichard MacCutchan21-Jan-15 21:10 
QuestionC# Google Drive Pin
Member 1125513321-Jan-15 18:30
Member 1125513321-Jan-15 18:30 
Question[Help] Data two tables with c# Pin
Member 1002317121-Jan-15 9:58
Member 1002317121-Jan-15 9:58 
AnswerRe: [Help] Data two tables with c# Pin
DamithSL21-Jan-15 16:10
professionalDamithSL21-Jan-15 16:10 
GeneralRe: [Help] Data two tables with c# Pin
Member 1002317122-Jan-15 1:29
Member 1002317122-Jan-15 1:29 
AnswerRe: [Help] Data two tables with c# Pin
roya.irani26-Jan-15 22:26
roya.irani26-Jan-15 22:26 
Question.NET Registry Creator Pin
Jassim Rahma21-Jan-15 9:01
Jassim Rahma21-Jan-15 9:01 
AnswerRe: .NET Registry Creator Pin
Pete O'Hanlon21-Jan-15 9:08
mvePete O'Hanlon21-Jan-15 9:08 
GeneralRe: .NET Registry Creator Pin
Jassim Rahma21-Jan-15 9:20
Jassim Rahma21-Jan-15 9:20 
GeneralRe: .NET Registry Creator Pin
Pete O'Hanlon21-Jan-15 9:31
mvePete O'Hanlon21-Jan-15 9:31 
GeneralRe: .NET Registry Creator Pin
Jassim Rahma21-Jan-15 9:40
Jassim Rahma21-Jan-15 9:40 
GeneralRe: .NET Registry Creator Pin
Pete O'Hanlon21-Jan-15 9:47
mvePete O'Hanlon21-Jan-15 9:47 
AnswerRe: .NET Registry Creator Pin
Wendelius21-Jan-15 9:10
mentorWendelius21-Jan-15 9:10 
AnswerRe: .NET Registry Creator Pin
Mycroft Holmes21-Jan-15 20:47
professionalMycroft Holmes21-Jan-15 20:47 
AnswerRe: .NET Registry Creator Pin
Bernhard Hiller22-Jan-15 0:58
Bernhard Hiller22-Jan-15 0:58 
QuestionCoding help Pin
Member 1139217221-Jan-15 7:04
Member 1139217221-Jan-15 7:04 
AnswerRe: Coding help Pin
Wendelius21-Jan-15 7:19
mentorWendelius21-Jan-15 7:19 
GeneralRe: Coding help Pin
Member 1139217221-Jan-15 7:43
Member 1139217221-Jan-15 7:43 
GeneralRe: Coding help Pin
Pete O'Hanlon21-Jan-15 9:06
mvePete O'Hanlon21-Jan-15 9:06 
QuestionDeserialize Parts of an XML Pin
Antonio Cambule20-Jan-15 22:32
Antonio Cambule20-Jan-15 22:32 
Hello,

I'm working on an implementation of web-apis that return xml responses. I need to deserialize them into objects and objectlists.

I've already did it with one type of structure, but struggling on an other. When the needed xml data starts directly after the root tag then everything goes fine, but if there are some other tags in between or the structure gets more complex, then it doesn't deserialize and my list stays empty.

My question therefore is, how can i deserialize parts of xml that maybe come some tags later than the root and ignore the rest.

To give a better picture to what i want to achieve i have uploaded a small test application with testing xml files on my dropbox account for you to download: Link to test-application.

One of them works, the other one is the one that should also work.

Info: Testapp is written using: #Develop 5, C# 5 and .Net-Framework 4.5.2

Working XML:
XML
<response>
  <result first="Value 1" second="5" third="122"/>
  <result first="Value 2" second="9" third="13"/>
  <result first="Value 3" second="12" third="4"/>
</response>


Not working XML:
XML
<response>
  <method>something here</method>
  <answer>
    <result first="Value 1" second="5" third="122"/>
    <result first="Value 2" second="9" third="13"/>
    <result first="Value 3" second="12" third="4"/>
  </answer>
</response>


The problem is, that i do not need the information <answer> and or <method> the only data that really matters is in the <result> tag. I would like to ignore the rest.

Thanks and regards
Antonio
AnswerRe: Deserialize Parts of an XML Pin
Daniel Pfeffer20-Jan-15 22:55
professionalDaniel Pfeffer20-Jan-15 22:55 
GeneralRe: Deserialize Parts of an XML Pin
Antonio Cambule20-Jan-15 23:13
Antonio Cambule20-Jan-15 23:13 
GeneralRe: Deserialize Parts of an XML Pin
Daniel Pfeffer21-Jan-15 0:40
professionalDaniel Pfeffer21-Jan-15 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.