title: Adding XML elements and attributes
body: <p>I have the following XML structure so that I can add my configuration details to lastconnected element:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;lastconnectedServers&gt;
  &lt;/lastconnectedServers &gt;
  </code></pre>
  
  <p>Now I want to do some XML operation like adding elements and attributes.For Example I want to add the elements to xml above:(Inside elemet lastconnectedServers):</p>
  
  <pre><code>&lt;Server ip="" domain=""&gt;
          &lt;SharedFolder name="" type=""/&gt;
          &lt;SharedFolder name="" type =""/&gt;
          &lt;SharedFolder name="" type =""/&gt;
  &lt;/Server&gt; 
  </code></pre>
  
  <p>so that the resulting XML will look something like below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;lastconnectedServers&gt;
     &lt;Server ip="" domain=""&gt;
          &lt;SharedFolder name="" type=""/&gt;
          &lt;SharedFolder name="" type =""/&gt;
          &lt;SharedFolder name="" type =""/&gt;
     &lt;/Server&gt;
  &lt;/lastconnectedServers &gt;
  </code></pre>