Introduction
Used to specify that the associated member is to be marshalled to and from an xml attribute of the root object node
Details
Used like this for variables
[XmlAttribute(name="level")]
public var level:int;
or this
private var _level;
[XmlAttribute(name="level")]
public function get level():int
{
return _level;
}
public function set level(value:int):void
{
_level = value;
}- The name of the attribute in the XML and the name of the variable do not need to match
- For unmarshalling you MUST provide a public setter