title: Java: Changing an xml node name without using renameNode()
body: <p>I've been renaming xml nodes using the document.renameNode() method:</p>
  
  <pre><code> Document document = loadXml(xml);
  
   NodeList list = document.getElementsByTagName("Entry1");
   for (int i=0; i &lt; list.getLength();)
   {
      document.renameNode(list.item(i), "", "Entry");
   }
  </code></pre>
  
  <p>However, the Java version I'm deploying to (1.5.0_09-b03) doesn't support the renameNode method. Any ideas how I could write the above in a way that's compatible with this version of Java?</p>
  
  <p>Thanks in advance.</p>