XML List returning Parent values in child dropdowns

iuqadnam

New Member
I have created an XML so when an option is chosen in the first dropdown, the next dropdown list will populate with the correct children from the XML. It is returning the correct child nodes but also the Parent values of those nodes. Is there some minor I am doing incorrectly.For example,If I have\[code\] <Root> <Data> <Values>MY LIST</Values> <ValuesDesc>MY LIST desc</ValuesDesc> <Value>field</Value> <Value1>field1</Value1> <Values>MY LIST 2</Values> <Value>2field2</Value> <Value1>2field3</Value1> </Data> </Root> \[/code\]I am able to return the values for "MY LIST" which are "field, field1", but included in the dropdown would be "MY LIST" and "MY LIST desc" ....been trying to see why it is returning those nocedsHere is a copy of the code\[code\]<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:samplecategories="services.samplecategories.*"><fx:Script> <![CDATA[ import mx.controls.Alert; import mx.events.FlexEvent; ]]></fx:Script><fx:Declarations> <fx:XML id="tempXML" source="sample.xml" format="e4x"/> <s:XMLListCollection id="cuePointXMLList" source="{tempXML.Type}" /></fx:Declarations><!--requireSelection="true"--><mx:Form horizontalCenter="0" top="20"> <mx:FormItem label="type:" required="true"> <s:DropDownList id="typeCB" dataProvider="{cuePointXMLList}" labelField="type" /> </mx:FormItem> <mx:FormItem label="subtype:" required="true"> <s:DropDownList id="subtypeCB" dataProvider="{new XMLListCollection(typeCB.selectedItem.children())}" labelField="subtype" /> </mx:FormItem> <mx:FormItem label="subtypeissue:" required="true"> <s:DropDownList id="subtype2CB" dataProvider="{new XMLListCollection(subtypeCB.selectedItem.children())}" labelField="subtype2" /> </mx:FormItem></mx:Form>\[/code\]
 
Back
Top