Let's suppose I have xml like this one:
<Server Active="No">
<Url>http://some.url</Url>
</Server>
C# class looks like this:
public class Server
{
[XmlAttribute()]
public string Active { get; set; }
public string Url { get; set; }
}
Is it possible to change Active property to type bool
and have XmlSerializer coerce "Yes" "No" to bool values?
Edit: Xml is received, I cannot change it. So, in fact, i'm interested in deserialization only.