Hi All,
Quick question:
I have an xml file which lists the suburbs and the value number for each suburb.
I wish to use this information from the XML file to populate my dropdown menu.
I am using php and here is what i have so far.
<?php
$file = "http://www.myxmlfile_xml.cgi?clientid=abcdef&searchtype=lease";
function contents($parser, $data){
echo $data;
}
function startTag($parser, $data){
echo "<b>";
}
function endTag($parser, $data){
echo "</b><br />";
}
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startTag", "endTag");
xml_set_character_data_handler($xml_parser, "contents");
$fp = fopen($file, "r");
$data = fread($fp, 80000);
if(!(xml_parse($xml_parser, $data, feof($fp)))){
die("Error on line " . xml_get_current_line_number($xml_parser));
}
xml_parser_free($xml_parser);
fclose($fp);
echo $data;
?>
Where do I go from here??
Thanks in advance