Connecting Tech Pros Worldwide Help | Site Map

XML Serialization - XmlAttributesOverrides

  #1  
Old August 13th, 2008, 03:05 AM
eBob.com
Guest
 
Posts: n/a
(I posted this earlier today to the dotnet.languages.vb group but then
discovered this more appropriate ng.)

I am trying to XML Serialize a user control object. I'm getting the
infamous "There was an error reflecting type" message. That message doesn't
really help me but I suspect that the problem is that my user control class
Inherts from UserControl. I don't really care about serializing any of the
members of UserControl but I don't know how to tell XML Serializer that.
Balena (a really excellent book; but some sections of it, like the section
on XML Serialization, are over my head) suggests that an
XmlAttributesOverrides object might be the solution. But I can't understand
if I will have to specify XmlIgnoreAttribute for all of the members of
UserControl, I don't want any of them, or can I just deal with the few
members of my user control that I do want serialized. In other words, in an
XmlAttributesOverrides object do you opt in the members you want or opt out
the ones you don't want?

Thanks, Bob


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create classes that can be Serialized by using XML Serialization: bharathreddy insights 0 July 5th, 2007 12:30 PM
XML Serialization of complex types as XML attributes Paulo Morgado [MVP] answers 3 January 24th, 2006 11:25 PM
XML serialization: choice eSapient answers 0 November 17th, 2005 02:00 AM
XML serialization problem ktn answers 0 November 12th, 2005 04:39 AM
XML Serialization Help Jeff T. answers 4 November 12th, 2005 04:30 AM