and i have an arrayCollection inside a class named friendList
containing list of friends which is inside a class
after serialization the xml should look like this(this is strictly
needed by client)
<FriendList xmlns:a="
http://MyAPPs.Listing/Friend">
<a:Friend>
<a:ID>1</a:ID>
<a:Name>Meera</a:Name>
</a:Friend>
<a:Friend>
<a:ID>2</a:ID>
<a:Name>Jenny</a:Name>
</a:Friend>
</FriendList >
so my array liooks like below
[XmlArray(alias="MyList ", order="7", memberName="Friend",
type="com.piyush.apps.lister.Friend")]
public var friendList:ArrayCollection;
and after serialazation the output is like this :(
<FriendList>
<Friend xmlns:a="
http://MyAPPs.Listing/Friend">
<a:ID>1</a:ID>
<a:Name>Meera</a:Name>
</Friend>
<Friend xmlns:a="
http://MyAPPs.Listing/Friend">
<a:ID>2</a:ID>
<a:Name>Jenny</a:Name>
</Friend>
</FriendList >
the code for Friend class is like this
[XmlClass(alias="Friend", ordered="true", prefix="a", uri="http://
MyAPPs.Listing/Friend")]
public class Friend extends DomainObject implements IIdentifiable
{
// properties
[XmlElement(alias="ID", order="1")]
public var friendID:String = "0";
[XmlElement(alias="Name", order="2")]
public var friendName:String = "Piyush";
}
the question is : is there any way i can add a namespace to an array?
Thanks,
Piyush