Interactive -> Choose One -> Xml Choices

Is it possible to iterate through an Xml Document to generate the list of options in a Choose One dialog?

So if I had an Xml Document like

[FruitChoices]
     [Fruit type="Apple" /]
     [Fruit type="Orange"/]
     [Fruit type="Pear" /]
[/FruitChoices]

I could use some kind of XPath like /FruitChoices/Fruit/@type  and have that populate my "Choices" in a choose one dialog?


My goal here is that I'll pull info out of a database into a temp xml document, and then load that xml document into some variables, and a choice dialog.

Thanks,
-Jeff

Hi Jeff

Off the top of my head, here’s how I would do it.

declare some variables :

fruit_type
choices

XML Node Iterator Action
xpath = /FruitChoices/Fruit
Set variable fruit_type to value of attribue type

Append to Variable Action, append to choices variable : %fruit_type%=%fruit_type%
Add CRLF before

Then in the Choose One action - in the before action script event :

Action.Choices.Text = FBVariables.Choices

HTH

That worked great, thanks a lot!