Accessibility

Table of Contents

Business Directory Sample: Flash MX 2004 Professional with PHP and MySQL

Creating XML Files

Now that you have populated both your database tables in the steps above, create the XML files needed to set the schema for the XMLConnector components later in the tutorial.

Note: These files contain dummy data; the actual data will come from the MySQL database.

  1. Create an XML file for the ComboBox of categories. Copy the code below and save it as category.xml.

    <menu>
    	<menu-title label="menu">
    		<menu-item label="Select Category" />
    		<menu-item label="Automobiles" />
    		<menu-item label="Computers" />
    		<menu-item label="clothing" />
    		<menu-item label="Restaurant" />
    		<menu-item label="something"/>
    	</menu-title>
    </menu>
    
    
  2. Create a second XML file to contain the details of the business. Copy the code below and save it as business.xml.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <datapacket>
      <row pID="1" Business="Business1" Address="Address 1" Telephone="12345" Website="http://www.b1.com" Email="email1@something.com" Details="some text for Details." Picture="image1.jpg" /> 
      <row pID="2" Business="Business2" Address="Address 2" Telephone="67879" Website="http://www.b2.com" Email="email2@something.com" Details="some more text for Details." Picture="image2.jpg" /> 
      <row pID="3" Business="Business3" Address="Address 3" Telephone="010203" Website="http://www.b2.com" Email="email3@something.com" Details="and some more text for Details." Picture="image3.jpg" /> 
    </datapacket>