Thanks Dino,
Going the other way (I know I didn't mention this) doesn't seem as elegant.
Is there a better way than this?
// slightly paraphrased
Stream stream = new MemoryStream();
new XmlSerializer( typeof(MyObject) ).Serialize( stream, myObject );
stream.Seek( 0, SeekOrigin.Begin );
XmlDocument doc = new XmlDocument();
doc.Load( stream );
return doc.DocumentElement;
Thanks again,
Brad
"Dino Chiesa [MSFT]" <dinoch@microsoft.com> wrote in message
news:OINWNnhVDHA.2260@TK2MSFTNGP09.phx.gbl...[color=blue]
> System.Xml.Serialization.XmlSerializer.Deserialize ()
> accepts an XmlReader.
>[/color]
http://msdn.microsoft.com/library/en...lizeTopic3.asp[color=blue]
>
> and you can create a System.Xml.XmlNodeReader from a System.Xml.XmlNode
>[/color]
http://msdn.microsoft.com/library/en...sctorTopic.asp[color=blue]
>
>
> "Brad Quinn" <brad_quinn@yahoo.com> wrote in message
> news:eF6R4ahVDHA.2248@TK2MSFTNGP10.phx.gbl...[color=green]
> > Lets say I have an XmlNode that validates against some schema. I also[/color]
> have[color=green]
> > a class that was generated by the xsd tool using said schema.
> >
> > What is the best way to get from an XmlNode to an instance of the class?
> >
> >[/color]
>
>[/color]