Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 28th, 2006, 05:15 PM
Keith Patrick
Guest
 
Posts: n/a
Default Behavior of XmlRootAttribute when the object is not the root element

Could someone explain to me the ramifications of declaring
XmlRoot("namespace") on a series of classes in which one or more are
aggregates within another? I have a bunch of classes with a single
namespace declared as XmlRoots, but the serialized XML that is outputted
puts those namespace decls on different elements depending on whether or not
the root element is one of the classes or an array of that class.
Basically, if it's an array, then the child elements of the parent class
each have the namespace declared on them. However, I'm serializing the
parent as root, the namespace declaration is on the parent, and the children
inherit it. The main problem with all of this is that these rules also
apply to deserialization, but I cannot determine what the serialization rule
actually is with regards to XmlRoot, as I can't see any real pattern that I
can describe in words.


 

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