Click here to Skip to main content
15,884,598 members
Home / Discussions / C#
   

C#

 
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 
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 
GeneralRe: Deserialize Parts of an XML Pin
Antonio Cambule21-Jan-15 0:56
Antonio Cambule21-Jan-15 0:56 
GeneralRe: Deserialize Parts of an XML Pin
Daniel Pfeffer21-Jan-15 2:51
professionalDaniel Pfeffer21-Jan-15 2:51 
AnswerRe: Deserialize Parts of an XML Pin
Gerry Schmitz21-Jan-15 13:00
mveGerry Schmitz21-Jan-15 13:00 
I looked over your "test app" but did not run it.

Your class definitions and the way you are looking at the xml appear flawed (e.g. the "response" is a high level container that contains a "list"; "response" is NOT a "list" as your class definitions seem to imply).

It would have been easier to "Edit | Paste special | Xml as classes" in Visual Studio. Doing that, I got the following for your "not working XML":
C#
/// 
   [System.Xml.Serialization.XmlTypeAttribute( AnonymousType = true )]
   [System.Xml.Serialization.XmlRootAttribute( Namespace = "", IsNullable = false )]
   public partial class response {

      private string methodField;

      private responseResult[] answerField;

      /// 
      public string method {
         get {
            return this.methodField;
         }
         set {
            this.methodField = value;
         }
      }

      /// 
      [System.Xml.Serialization.XmlArrayItemAttribute( "result", IsNullable = false )]
      public responseResult[] answer {
         get {
            return this.answerField;
         }
         set {
            this.answerField = value;
         }
      }
   }

   /// 
   [System.Xml.Serialization.XmlTypeAttribute( AnonymousType = true )]
   public partial class responseResult {

      private string firstField;

      private byte secondField;

      private byte thirdField;

      /// 
      [System.Xml.Serialization.XmlAttributeAttribute()]
      public string first {
         get {
            return this.firstField;
         }
         set {
            this.firstField = value;
         }
      }

      /// 
      [System.Xml.Serialization.XmlAttributeAttribute()]
      public byte second {
         get {
            return this.secondField;
         }
         set {
            this.secondField = value;
         }
      }

      /// 
      [System.Xml.Serialization.XmlAttributeAttribute()]
      public byte third {
         get {
            return this.thirdField;
         }
         set {
            this.thirdField = value;
         }
      }
   }

QuestionIE 11 Registry Entries Pin
namerg20-Jan-15 11:43
namerg20-Jan-15 11:43 
AnswerRe: IE 11 Registry Entries Pin
Pete O'Hanlon20-Jan-15 11:50
mvePete O'Hanlon20-Jan-15 11:50 
GeneralRe: IE 11 Registry Entries Pin
namerg20-Jan-15 11:57
namerg20-Jan-15 11:57 
GeneralRe: IE 11 Registry Entries Pin
Pete O'Hanlon20-Jan-15 12:14
mvePete O'Hanlon20-Jan-15 12:14 
GeneralRe: IE 11 Registry Entries Pin
namerg20-Jan-15 14:13
namerg20-Jan-15 14:13 
QuestionHex to UUEncode in C# Pin
NJdotnetdev20-Jan-15 2:04
NJdotnetdev20-Jan-15 2:04 
AnswerRe: Hex to UUEncode in C# Pin
OriginalGriff20-Jan-15 2:50
mveOriginalGriff20-Jan-15 2:50 
GeneralRe: Hex to UUEncode in C# Pin
NJdotnetdev20-Jan-15 3:24
NJdotnetdev20-Jan-15 3:24 
GeneralRe: Hex to UUEncode in C# Pin
OriginalGriff20-Jan-15 3:35
mveOriginalGriff20-Jan-15 3:35 
GeneralRe: Hex to UUEncode in C# Pin
NJdotnetdev20-Jan-15 3:43
NJdotnetdev20-Jan-15 3:43 
GeneralRe: Hex to UUEncode in C# Pin
OriginalGriff20-Jan-15 4:01
mveOriginalGriff20-Jan-15 4:01 
GeneralRe: Hex to UUEncode in C# Pin
NJdotnetdev20-Jan-15 4:42
NJdotnetdev20-Jan-15 4:42 
GeneralRe: Hex to UUEncode in C# Pin
OriginalGriff20-Jan-15 4:57
mveOriginalGriff20-Jan-15 4:57 
GeneralRe: Hex to UUEncode in C# Pin
NJdotnetdev20-Jan-15 5:00
NJdotnetdev20-Jan-15 5:00 
GeneralRe: Hex to UUEncode in C# Pin
OriginalGriff20-Jan-15 5:18
mveOriginalGriff20-Jan-15 5:18 
GeneralRe: Hex to UUEncode in C# Pin
NJdotnetdev20-Jan-15 5:41
NJdotnetdev20-Jan-15 5:41 
GeneralRe: Hex to UUEncode in C# Pin
OriginalGriff20-Jan-15 5:43
mveOriginalGriff20-Jan-15 5:43 

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.