all groups > dotnet xml > february 2004 >
You're in the

dotnet xml

group:

XML Serialize


XML Serialize JG
2/27/2004 2:37:53 PM
dotnet xml: I have a class

public class DooDaa
{
public String ThisThat = "123";
}

The xml that I want to create should look like.
<DooDaa>
<Somthing ThisThat="123"/>
</DooDaa>

How can I get the xml to look like that when I serialize the class.
FYI: I saw some of the previous posts that were simular to this, but the
solutions did not work for what I am trying to do.

Thanks in advance

Re: XML Serialize Jiho Han
3/2/2004 9:28:02 AM
[XmlRootAttribute]
public class DooDaa
{
[XmlAttributeAttribute]
public String ThisThat = "123";
}

is probably it...
[quoted text, click to view]

AddThis Social Bookmark Button