Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
twoei22 #1
accessing node value rather than attribute
Hello Guys,
I have some XML that looks like this:
<search>
<arrivals>
<option value="ADL">Adelaide</option>
</arrivals>
</search>
When i use it with a comboBox as so:
<mx:ComboBox id="arrivalCityCombo" dataProvider="{searchXML.arrivals.option}"/>
I get the reverse of what I want as in - the display of the drop down is ADL
and whan I try to get the value by doing:
<mx:Model id="newModel"> <airport>{arrivalCityCombo.selectedItem}</airport>
I get Adelaide.??
Anyway to access the value rather than the content.
I know that scemantically it makes more sense to have the value in the node
but just wanted to know..
Thanks
twoei22 Guest
-
XML node inserting
Hi is it possible use the function insertChildAfter() (or another useful function) to insert a node under the root node? For example, suppose... -
Accessing attribute in XML for HTTPService
How can I access an attribute in a tag which is being used as a DataProvider for a DataGrid? <root> <item> <option1 id="123">Some... -
Retrive data from attribute spaced attribute.
Hi. I'm retrieving data from an excel sheet. But one of the attributes is name "Phone private". This is a problem when I want to write out the... -
Retrieving XML attribute using XML::XPath::Node::Attribute
Hi I am trying to retrieve an attribute of a particular node from my XML using "XML::XPath::Node::Attribute", but couldn't come across on how to... -
xpath - how to find a node where a specific attribute does NOT exist?
Hi, since there doesn't appear to be a way to get the individual elements that make up the xpath to a result node, I'm trying to create an xpath... -
ntsiii #2
Re: accessing node value rather than attribute
Use a labelFunction:
<mx:ComboBox ... labelFunction="lblFnArrival" ...
private function lblFnArrival(oItem:Object):String{
return oItem.nodeValue;
}
ntsiii Guest
-
ntsiii #3
Re: accessing node value rather than attribute
You might have to get the text node of the item:
return oItem.firstChild.nodeValue;
ntsiii Guest



Reply With Quote

