xml parser in php

There is a build in function in php using which you can parse xml file to an array. I have an example created for the same, and it goes as mentioned below:

$xmlString = $raw;
$xmlParser = xml_parser_create();
xml_parse_into_struct($xmlParser, $xmlString, $values, $main);
xml_parser_free($xmlParser);

print_r(‘<pre>’);
echo “<b>Main array</b><br>”;
print_r($main);
echo “<br>”;
echo “<b>Values array</b><br>”;
print_r($values);
print_r(‘</pre>’);

Thanks,

Sachin (http://www.avidindiainc.com)