website named XML2 using WebMatrix This website is made of t
Solution
<bookstore>
<book>
<title>Everyday </title>
<author>john</author>
<year>2006</year>
<price>40.00</price>
<book publisher=\"pearson\"></book>
</book>
<book>
<title>Harryr</title>
<author>Rowling</author>
<year>2009</year>
<price>30</price>
<book publisher=\"pearson\"></book>
</book>
</bookstore>
if (isset($_POST[\'rowNumber\'])) {
$rowNumber = $_POST[\'rowNumber\'];
$file = $_POST[\'file\'];
$dom = new DOMDocument();
$dom->load(\"../XML/\".$file);
$xml = $dom->documentElement;
//PROBLEM HERE
$xml->childNodes->item(0)->parentNode->removeChild($xml->childNodes->item($rowNumber));
$handle = fopen(\"../XML/\".$file, \'w\');
fwrite($handle, $dom->saveXML());
}
$xml->childNodes->item(0)->parentNode->removeChild($xml->childNodes->item(2));
