--続き--

いろいろ調べたところ、

$xml = new SimpleXMLElement('sample.xml', null, true);
unset($xml->book[0]);

で削除は出来るのようですが、配列で何番目という指定ではなくid「00002」の要素を指定して削除し、

<?xml version="1.0" encoding="UTF-8" ?>
<library>
  <book id="00001">
    <title>aaa</title>
    <author>Emily</author>
  </book>
  <book id="00003">
    <title>ccc</title>
    <author>Mike</author>
  </book>
</library>

となる事が目的です。
どうぞよろしくお願いします。