Are you still writing deserialization classes for XML types? Don’t you just want to copy an example XML document and have Visual Studio auto generate the deserialization class?
Steve Maine just showed this little tool that’s currently available in the BizTalk Services SDK that takes an instance doc like this:
<bla>
<foo />
</bla>
Then you select Paste XML as Serializable Type from the Edit Menu in VS (2005 or Orcas):
And you’ll get a class to deserialize the document:
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", ElementName = "bla")]
public class BlaClass
{
private string fooField;
[System.Xml.Serialization.XmlElementAttribute(Namespace = "", ElementName = "foo")]
public virtual string Foo
get
return this.fooField;
}
set
this.fooField = value;
You can find the tool at:
C:\Program Files\BizTalk Services SDK\Samples\Web\Tooling
Enjoy,
Christoph