J
John Lee
Hi,
I created a strong-typed (Class1) collection class for my web service, it
actually serialized to <ArrayOfClass1 /> and I need to make the root named
as <Class1Collection /> so I was trying to add an XmlRootAttribute but I
always got error message when I tried to serialize this collection class,
Could anyone point me out why and how to achieve the goal?
[XmlRoot("Class1Collection")]
public class Class1Collection : Collectionbase
{
...
}
2. What should I do if I need the serialized xml has namespace prefix like
the following:
<ns0:Class1Collection xmlns:ns0="http://mynamespace">
...
</ns0:Class1Collection>
Thanks very much in advance!
John
I created a strong-typed (Class1) collection class for my web service, it
actually serialized to <ArrayOfClass1 /> and I need to make the root named
as <Class1Collection /> so I was trying to add an XmlRootAttribute but I
always got error message when I tried to serialize this collection class,
Could anyone point me out why and how to achieve the goal?
[XmlRoot("Class1Collection")]
public class Class1Collection : Collectionbase
{
...
}
2. What should I do if I need the serialized xml has namespace prefix like
the following:
<ns0:Class1Collection xmlns:ns0="http://mynamespace">
...
</ns0:Class1Collection>
Thanks very much in advance!
John