title: Add node to xml file with properties through java
body: <p>I am new to XML parsing in Java
  I have an XML file</p>
  
  <pre><code>&lt;root&gt;
      &lt;project name="A"&gt;
          &lt;Sub name="abc"&gt;
              &lt;first property1="ab" property2="cd" property3="ed"/&gt;
              &lt;second property1="aa" property2="dd" property3="ke"/&gt;
          &lt;/Sub&gt;
      &lt;/project&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>I need to add another node as second with different property values
  (i.e.,)</p>
  
  <pre><code>&lt;root&gt;
      &lt;project name="A"&gt;
          &lt;Sub name="abc"&gt;
              &lt;first property1="ab" property2="cd" property3="ed"/&gt;
              &lt;second property1="aa" property2="dd" property3="ke"/&gt;
              &lt;second property1="oa" property2="ld" property3="je"/&gt;
          &lt;/Sub&gt;
      &lt;/project&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Can anyone tell me how to go ahead and implement in java?</p>