0

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!!!

JD Isaacks
  • 56,088
  • 93
  • 276
  • 422

1 Answers1

0

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.

Sri
  • 5,805
  • 10
  • 50
  • 68