# XMLConnector to ComboBox to ListBox to Labels

**URL:** <https://forum.kirupa.com/t/xmlconnector-to-combobox-to-listbox-to-labels/172271>\
**Category:** Uncategorized\
**Created:** [December 12, 2005, 10:41pm UTC](https://forum.kirupa.com/t/xmlconnector-to-combobox-to-listbox-to-labels/172271 "2005-12-12T22:41:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pneumonic](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Pneumonic](https://forum.kirupa.com/u/Pneumonic)\
**Post date:** [December 12, 2005, 10:41pm UTC](https://forum.kirupa.com/t/xmlconnector-to-combobox-to-listbox-to-labels/172271/1 "2005-12-12T22:41:11Z")

</div>

Hello again everyone…It’s been some time. Here we go.

What I’m trying to do is basically use an xml connector to get an xml doc and then parse it through a combo box to list out categories first, which then populates the listbox which, when selected, would populate several label fields. Now I can use text fields instead if there is a solution, but I can’t figure out at what point my thing is going wrong. Here is my xml structure:

```auto

<?xml version="1.0" encoding="UTF-8"?>
<buscategories>
	<category desc="Computers">
		<business name="MyBusiness">
		<busname>MyBusiness</busname>
		<address1>address here</address1>
		<address2>address here</address2>
		<address3>city,state zip</address3>
		<phone>888-888-8888</phone>
		<website>http://www.this.com</website>
		<description>All your base are belong to us!</description>
		</business>
	</category>
</buscategories>

```

The xml doc is created by hand, because this is an offline app, so no php or mysql is available, although I wish it was. My fla is 3mb, which is weird because the only thing on it are ui components, so I can’t upload it, but I attached a screen shot. I attempted doing this several other ways such as using a dataset and datagrid, but both kicked my arse so I went to the listbox. I’m new to using the ui components although I’ve flashed for awhile. Any help on this is much appreciated.  
[edit]  
Here’s the AS I’m using.

```auto

//First load the xml
direc_xml.trigger();

function SelectItem(){ 
   businessname	= listBox.getSelectedItem().data["busname"];
   address1	= listBox.getSelectedItem().data["address1"];
   address2	= listBox.getSelectedItem().data["address2"];
   address3	= listBox.getSelectedItem().data["address3"];
   phone	= listBox.getSelectedItem().data["phone"];
   website	= listBox.getSelectedItem().data["website"];
   description	= listBox.getSelectedItem().data["description"];
}

listBox.setChangeHandler("SelectItem");

```

[/edit]
