[code snipped]

Why would you do all that work when you can just do this...

public class Std {
   public Int32 MyVal;
   public String MyString;
}

public class MyObject {
   public Std Std;
}
Type[]types = new Type[]{typeof(MyObject)};
XmlSerializer[] s = XmlSerializer.FromTypes(types);

Plus this is supported by Microsoft.  IXmlSerializable is not supported by MS (or so 
says my help files).

If you have more complicated XML, then you can use the serialization attributes.  No 
reason to do it all yourself.

Justin

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to