i am trying to create a page of xml from php
$xml = new DOMDocument();
$xml->load("recv.xml") or exit("not loaded");
$xml_album = $xml->createElement("Album");
$xml_track = $xml->createElement("Track");
$xml_album->appendChild( $xml_track );
$xml->appendChild( $xml_album );
$doc->save('recv.xml');
this is my script but it is not working
Do i need to include to any file. Help me
Edit, error description according to comment;
DOMDocument::load() [function.DOMDocument-load]:
Start tag expected, '<' not found
You should probably create a fresh new document instead of loading existing not properly formed document.
XML is not allowed to have more than one root node, so if you are using
<Album>as a root, opening existing document and adding one more root node will also produce error.