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 / XML / June 2004

Tip: Looking for answers? Try searching our database.

xsd.exe and XmlType?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bradley Plett - 05 Jun 2004 01:12 GMT
I have a relatively simple xsd which I am turning into a class using
"xsd.exe".  I then create a collection of these classes.  I have run
into one minor problem.  When serializing my collection, I would like
the names of the elements to be different from the class name as
generated by xsd.exe.  I don't want to change the class name itself,
due to naming conventions.  This is trivial to do after-the-fact by
adding the "XmlType" tag to the signature of the class.  However, when
I regenerate from the xsd, the tag disappears.  Is there some way of
putting the "XmlType" information into the xsd so that xsd.exe
maintains it?  Alternatively, is there an easy way to rename the
elements when serializing?

Thanks!
Brad.
Yan Leshinsky - 05 Jun 2004 04:48 GMT
Following is a detailed description on how to do that:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemxmlserializationxmlattributeoverridesclasstopic.asp


>I have a relatively simple xsd which I am turning into a class using
> "xsd.exe".  I then create a collection of these classes.  I have run
[quoted text clipped - 10 lines]
> Thanks!
> Brad.
Bradley Plett - 09 Jun 2004 22:14 GMT
I have been unable to make that sample work for a class that inherits
from a collection.  Any further help or examples would be much
appreciated!

Thanks!
Brad.

>Following is a detailed description on how to do that:
>
[quoted text clipped - 14 lines]
>> Thanks!
>> Brad.

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.