actually I'm trying to serialize an XMl file in C# and it's working good for elements but not for attributes I get the attributes as an XML elements I've tried so many things : xmlAttribute, xmlAttribute with XmlRoot..... but it's not working
here is an exemple of how I do it
public class Book
{
[XmlAttribute("id")]
public string id {get;set;}
}
what I want :
<Book id="1"></Book >
what I got :
<Book>
<id>1</id>
</Book>
Thank you