Both standards can be used for dataprovider use by other standards. the data obtained from the backend is generally in XML format, but the XML obtained in flex cannot be directly written into the image list, combox, in a linkbar or other standard, you must first import mx: model or mx: XML before using it. You can also use array to parse the XML, other cases can be handled using objects. This will be done in the next section.
MX: Model
<Mx: Model id = "linkdata">
<Part> GG </Part>
<Item>
<Label>
Dfsg
</Label>
<DATA>
DF
</Data>
</Item>
<Item>
<Label>
Dfsgfd
</Label>
<DATA>
DFF
</Data>
</Item>
</MX: Model>
For example, the model definition can use {linkdata. item}, so if you want to obtain the vertex value, you can use linkdata. part or linkdata. item [0]. label. The obtained values are Gg and dfsg.
MX: XML
Example
<Mx: XML id = "treexml">
<Node label = "mail">
<Label> DF </label>
<DATA> dfgg </data>
</Node>
<Node>
<Label> FGD </label>
<DATA> hdfh </data>
</Node>
<Node>
<Label> FH </label>
<DATA> fgtpd </data>
</Node>
</MX: XML>
As defined in XML, {linkdata can be used in lists and comboxes. childnodes} to complete (from linkdata. childnodes. in tostring (), we can see that it passes through dataprovider. when additem is added, the format <mx: Object Label = "" Data = ""/> is not the same as that in MX: model, yes <item> <label> </label & gt; <DATA> </data> </item> (or mx: XML and mx: model are the same ), so you can use linkdata in MX: model. item can indicate all worker partitions, while linkdata in MX: XML. childnodes only displays the newly added data records .),
In addition, if a single vertex is used to obtain a value, use linkdata. childnodes [0]. firstchild. firstchild. nodevalue. The value is DF.