views:

500

answers:

1

say I have an xmllist like this (but with many other attributes not shown for brevity):

<node metal="white gold"/>
<node metal="yellow gold"/>
<node metal="silver"/>

and I access the metal attributes via xmllist.@metal which will give me a new xmllist like this:

white gold
yellow gold
silver

I want to convert that to an xmllist that looks like this:

<item label="White Gold" data="white gold"/>
<item label="Yellow Gold" data="yellow gold"/>
<item label="Silver" data="silver"/>

This way I can use it as a dataProvider in a combobox.

Anyone know how I can do this?

Thanks!!!

A: 

You can set the labelField of the ComboBox as "@metal". Better yet, have a custom labelFunction that changes the values in @label to title casing as required in your example.

Srirangan
Thanks..I was able to use labelFunction to solve my needs.
John Isaacks