I have all my xml tags going into the $temp variable with the correct "tag' name as you can see. Teh problem i'm having is detecting empty XML tags. I tried to set teh $temp array index to either empty string, null, or space but none of that works. Have any ideas?
function startElement($parser, $name, $attrs=''){
global $current_tag;
$current_tag = $name;
}
function endElement($parser, $name, $attrs=''){
global $close_tags, $temp, $current_tag;
}
function characterData($parser, $data){
global $current_tag, $temp, $catID;
switch($current_tag){
case 'CITY':
$temp['CITY'] = $data;
$current_tag = '';
break;
case 'STATE':
$temp['STATE'] = $data;
$current_tag = '';
break;
}
}
//setting up parser and opening file is all here.