How do I make a serilaization class for this?

Posted by chobo2 on Stack Overflow See other posts from Stack Overflow or by chobo2
Published on 2010-05-03T23:53:34Z Indexed on 2010/05/03 23:58 UTC
Read the original article Hit count: 162

Filed under:
|
|
|

Hi

I have something like this(sorry for the bad names)

<root>
  <product></product>
  <SomeHighLevelElement>
     <anotherElment>
          <lowestElement> </lowestElement>
     </anotherElment>
  </SomeHighLevelElement>
</root>

I have something like this for my class

public class MyClass
{
    public MyClass()
    {
        ListWrapper= new List<UserInfo>();
    }


    public string product{ get; set; }


    public List<SomeHighLevelElement> ListWrapper{ get; set; }


}

public class SomeHighLevelElement
{

    public string lowestElement{ get; set; }
}

But I don't know how to write the code for the "anotherElement" not sure if I have to make another wrapper around it.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xml-serialization