George George

George George

  • NA
  • 778
  • 0

customize deserialization sample in C#?

Feb 22 2009 8:50 PM

Hello everyone,

I am looking for a sample, which could let me deserialize an XML stream encoded in UTF-8 into a field of a class. More specifically, I have a class like,

[Code]
    class Foo
    {
        string abc;
        byte[] bcd;
    }
[/Code]

and abc maps to XML element "Abc" and bcd maps to XML element "Bcd", and I want to get the stream for bcd and retrieve bytes (from XML stream for related element "Bcd" directly) to manipulate manually/in a customized way.

I am looking for a sample, but failed, could anyone help to point me to a related sample or wrote some pseudo code?

thanks in advance,
George