[xmlIgnore]

  • Thread starter Thread starter Romain TAILLANDIER
  • Start date Start date
R

Romain TAILLANDIER

hi group

throw the XmlSerializer class, public properties/variable are code to xml,
and private aren't.
i can put an [XmlIgnore] attribut to force the serializer to not serialise a
public member, but how can i do to force the serializer to take care about a
private member ?

clearly what's the opposite of [XmlIgnore] ?

I try to dynamically put the attribute to XmlIgnore(false) or something like
that, but don't seems to work.

thanks for any help :)
ROM
 
Hi,

see:
http://msdn.microsoft.com/library/d...ide/html/cpconintroducingxmlserialization.asp

Note the text:
"
Note XML serialization does not convert methods, indexers, private
fields, or read-only properties (except read-only collections). To serialize
all an object's fields and properties, both public and private, use the
BinaryFormatter instead of XML serialization.
"

In addition to this, you can use SoapFormatter to serialize the object to
SOAP format.
 
Back
Top