title: parsing the xml to get the root element and then add a tag dynamically under the root tag
body: <p>I want to parse the xml file to get the root element. Then append add the tag named <em>first-name</em> under that root tag. How do I do this ? This is what I have been doing right now :</p>
  
  <pre><code>        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
          DocumentBuilder db = dbf.newDocumentBuilder();            
          Document document = db.newDocument();
  
          Element blobKey_E = document.createElement("first-name");
          blobKey_E.appendChild( document.createTextNode( name ) );
          // NOW APPEND blobKey_E to the root element 
          // After getting the root element from the xml in some directory
  
          TransformerFactory tf = TransformerFactory.newInstance();
          Transformer transformer = tf.newTransformer();
          DOMSource source = new DOMSource(document);
          StreamResult result = new StreamResult(new File("/home/non-admin/NetBeansProjects/Personal Site_Testers/web/xml/xml_1.xml"));
          transformer.transform(source, result);
  </code></pre>