views:

48

answers:

0

Hi,

I have a scenario in which I have a class Resource which has two other classes nested in it; Action and ResourceURL. I need to write custom xmlserializer for Resource and Action but not for ResourceURL. I implemented IXmlSerializable for both.

The problem is, when Resource is serialized, i call the Action.WriteXML(XmlWriter) to get the serialized form of Action, but i can't get serialized form of ResourceURL. The tags become all messed up and it also adds an tag.

So how do i serialize an object which has customer serilzation for some nested objects but not for others?