title: How to delete an XML element using Java DOM in Jython?
body: <p>Suppose I have a XML file like this (bookstore.xml )</p>
  
  <pre><code>&lt;bookstore&gt;
  &lt;book category="cooking"&gt;
  &lt;title lang="en"&gt;Everyday Italian&lt;/title&gt;
  &lt;author&gt;Giada De Laurentiis&lt;/author&gt;
  &lt;year&gt;2005&lt;/year&gt;
  &lt;price&gt;30.00&lt;/price&gt;
  &lt;/book&gt;
  &lt;book category="children"&gt;
  &lt;title lang="en"&gt;Harry Potter&lt;/title&gt;
  &lt;author&gt;J K. Rowling&lt;/author&gt;
  &lt;year&gt;2005&lt;/year&gt;
  &lt;price&gt;29.99&lt;/price&gt;
  &lt;/book&gt;
  &lt;book category="web"&gt;
  &lt;title lang="en"&gt;XQuery Kick Start&lt;/title&gt;
  &lt;author&gt;James McGovern&lt;/author&gt;
  &lt;author&gt;Per Bothner&lt;/author&gt;
  &lt;author&gt;Kurt Cagle&lt;/author&gt;
  &lt;author&gt;James Linn&lt;/author&gt;
  &lt;author&gt;Vaidyanathan Nagarajan&lt;/author&gt;
  &lt;year&gt;2003&lt;/year&gt;
  &lt;price&gt;49.99&lt;/price&gt;
  &lt;/book&gt;
  &lt;book category="web" cover="paperback"&gt;
  &lt;title lang="en"&gt;Learning XML&lt;/title&gt;
  &lt;author&gt;Erik T. Ray&lt;/author&gt;
  &lt;year&gt;2003&lt;/year&gt;
  &lt;price&gt;39.95&lt;/price&gt;
  &lt;/book&gt;
  &lt;/bookstore&gt;
  </code></pre>
  
  <p>And I want to delete the <code>book</code> element whose <code>author</code> = J K Rowling.<br>
  I know I can get all the elements matching author like this (Jython)</p>
  
  <pre><code>docFactory = DocumentBuilderFactory.newInstance()
  docBuilder = docFactory.newDocumentBuilder()
  doc = docBuilder.parse(bookstore.xml)
  list = doc.getElementsByTagName("author")
  </code></pre>
  
  <p>I want to write the modified XML tree to bookstore.xml.</p>
  
  <p>Thanks ! </p>