I am getting error while loading the xml file. I got many answers related to the topic but I really could not find why this error maybe coming in my file.\[code\]Warning: DOMDocument::load() [<a href='http://stackoverflow.com/questions/13785933/domdocument.load'>domdocument.load</a>]: Extra content at the end of the document \[/code\]When I am running the file, it runs successfully, but when I reload it, it gives the above error instead of adding another node. But, next time when I reload it runs successfully again. This is happening alternatively. Please someone tell me why is this happening and how to solve the problem.I am using this php code to edit the xml file:\[code\]<?php$dom = new DomDocument("1.0", "UTF-8");$dom->load('filename.xml');$noteElem = $dom->createElement('note');$toElem = $dom->createElement('to', 'Chikck');$fromElem = $dom->createElement('from', 'ewrw');$noteElem->appendChild($toElem);$noteElem->appendChild($fromElem);$dom->appendChild($noteElem);$dom->formatOutput = TRUE;//$xmlString = $dom->saveXML();//echo $xmlString;$dom->save('filename.xml');?>\[/code\]This is the xml file I am editing:\[code\]<?xml version="1.0" encoding="UTF-8"?><note> <to>Chikck</to> <from>ewrw</from></note>\[/code\]