Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / November 2004

Tip: Looking for answers? Try searching our database.

'xsd.exe' generated classes and the Serializable attribute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt Holmes - 14 Oct 2004 20:25 GMT
Is there anyway to get 'xsd.exe' to mark the class hierarchy it generates
with the [Serializable] attribute? I need to be able to serialize the class
hierarchy as both XML and a byte stream and I don't have the luxury of hand
editing the generated file (it is regenerated as part of my pre-build step,
because I makes quite a few changes during the initial stages of the
project).  I don't want to have to copy the data to a special serializable
proxy, thats a total waste of effort and defeats the purpose of using
'xsd.exe' to generate my hierarchy anyway.

Anyone know of a work around for this?
Dino Chiesa [Microsoft] - 26 Oct 2004 17:16 GMT
sed.exe  -
can edit  a generated file from the command line or from a build step.

I do this all the time from within makefiles to tweak generated files.

> Is there anyway to get 'xsd.exe' to mark the class hierarchy it generates
> with the [Serializable] attribute? I need to be able to serialize the
[quoted text clipped - 9 lines]
>
> Anyone know of a work around for this?
Mujtaba Syed - 03 Nov 2004 21:24 GMT
Hi Matt:

Since you have converted a schema to a class definition using XSD.EXE, you
should use the XmlSerializer framework!

Thanks.
Mujtaba Syed.

> Is there anyway to get 'xsd.exe' to mark the class hierarchy it generates
> with the [Serializable] attribute? I need to be able to serialize the class
[quoted text clipped - 6 lines]
>
> Anyone know of a work around for this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.