Given :-
[XmlRoot("Book")]
public class Book
{
[XmlAttribute]
public string Title;
[XmlElement]
public string Publisher;
[XmlElement]
public string PublisherReference;
}
When serialized to XML will give
<Book Title="My Book">
<Publisher>Some Publisher</Publisher>
<PublisherReference>XYZ123</PublisherReference>
</Book>
How could I get PublisherReference as an attribute of Publisher - e.g.
<Book Title="My Book">
<Publisher Reference="XYZ123">Some Publisher</Publisher>
</Book>