How do I get the attributes to the inner element rather than root element?
[XmlRoot("Root")]
public class Test
{
string type=null;
int value=0;
public string Type
{
get { return type; }
set { type=value; }
}
[XmlAttribute]
public int Value
{
get { return type; }
set { type=value; }
}
}
will result into
<Root Value="">
<Type>
</Type>
</Root>
However I want
<Root >
<Type Value="">
</Type>
</Root>
Please help me out. Thanks in advance.