all groups > dotnet xml > june 2004 >
You're in the

dotnet xml

group:

XmlSerializer help


Re: XmlSerializer help Christoph Schittko [MVP]
6/5/2004 11:25:50 AM
dotnet xml:
Timothy,

take a look at Chris Lovett's XmlNodeWriter on www.gotdotnet.com [0].

Simply pass the node where you want to insert the serialized XML into the
XmlDocument to an XmlNodeWriter and pass the XmlNodeWriter to the Serialize
method.

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

[0]
http://gotdotnet.com/Community/User/Samples/download.aspx?FileGuid=de71bc7f-4ae0-41f4-b0dd-2e378a25b797

[quoted text, click to view]

XmlSerializer help Timothy V
6/5/2004 2:15:12 PM
Hi,
I have a class:
public class Note
{
public string name;
public string information;
}

And i Serialize this class, but want to Serialize it to an XmlDocument which
will contain many of these elements.

How do i do this?

Thank you,

Tim.

Re: XmlSerializer help Timothy V
6/6/2004 11:06:27 AM
Thanks! That works. However, is there any other way to do it? (ie not use
XmlNodeWriter)

Thanks,

Tim.

"Christoph Schittko [MVP]" <christophdotnetINVALID@austin.rr.com> wrote in
message news:e9NLEnxSEHA.1172@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]

Re: XmlSerializer help Christoph Schittko [MVP]
6/7/2004 9:51:12 PM
Nothing that's equally elegant ... and if you want the result to be in an
XmlDocument then it's the way to go.

If you just need a string or a stream, then you can serialize to a
StreamWriter or an XmlTextWriter.

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

[quoted text, click to view]

AddThis Social Bookmark Button