Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 31st, 2006, 01:45 PM
David Jessee
Guest
 
Posts: n/a
Default Woah

You're right buddy.

I trapped the code that was generated by the XmlSerializer and took a look
at it.
There's nothing about cardinality, per se. However, it looks like the
following happens:

XSD to class structure (via sxd.exe): The source cs file is created and
eventually compiled.
The XmlSerializer is instantiated and methods are created for the generatio
of the actual XML Elements (one for every hierarchicaly unique element). The
order of these method calls is identical to the order that the properties
occure in the original source file that was generated by XSD.exe.

So, do you think that I can make this assumption?
If you take the approach of:
1) Create an XSD document
2) generate a class model
3) Allow the XmlSerializer to generate its code for serialization

Then the sequence of elements will be fine, even though we all know that the
structure may or may not be valid (e.g. minOccurs, redefinition of simple
types, etc).

However, if we want to take the XmlElement attribute approach for indicating
which properties are serialized, we will have to make sure our source code is
written in the correct order for the resultant XML to be validated.

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles