I have the following xml being returned when using fsockopen (shortened the xml for ease of reading):
<car>
  <brand type="AUDI">
    <engine>1.8</engine>
    <price>9000</price>
  </brand>
</car>
I use the following code to get the values:
    $p = xml_parser_create();
    xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0);
    xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1);
    xml_parser_set_option($p, XML_OPTION_TARGET_ENCODING, 'UTF-8'); 
    xml_parse_into_struct($p, $return_xml, $vals, $index);
    xml_parser_free($p);
    $return_array["engine"] = $vals[$index["engine"][0]]["value"];
    $return_array["price"] = $vals[$index["price"][0]]["value"];        
Which gives me the engine, and price but how can I get the value brand type?
Thanks
 
    