audreycandy
New Member
i am trying to read xml node's attribute from that fileusing simple xml reader\[code\]<songs><song title="On Mercury" artist="Red Hot Chili Peppers" path="/red-hot-chili-peppers/on-mercury.mp3" /><song title="Universally Speaking" artist="Red Hot Chili Peppers" path="/red-hot-chili-peppers/universally-speaking.mp3" /></songs>\[/code\]i used that code to read itbut it gave me xml parse error\[code\]<?php$xml = simplexml_load_file("playlist.xml") or die("Error: Cannot create object");foreach($xml->children() as $data){ echo $data->song['title']; echo "<br />";}?>\[/code\]please help me