Custom XML Serialization, how to write custom root element?
- by Beta033
I'm probably just doing this wrong, i know.
i'm using custom serialization and when the xml is generated it's putting the class name as the root element
Example:
<MyClassName>
<MyIntendedRootNode>
<ObjectType>
<Property1/>
<Property2/>
...
I'm inoking the serialization by calling xmlserializer.Serialize(writer,Me) so i'm sure that has something to do with it.
I've tried putting XMLRoot onto the class, but i think as vb is compiling this partial class with it's aspx page, it's either overwriting this property or ignoring it entirely.
ideally i'd like to just tell it to either throw away everything it has and use a different root element.
Anybody else do this except me?
Thanks