title: Insert new element to XML
body: <p>I have a program that inserts a new lesson to a course XML. Here is the XML file:</p>
  
  <pre><code>Course.xml
  
  &lt;Courses&gt;
  
     &lt;Course&gt;
        &lt;Name&gt;ABC course&lt;/Name&gt;
        &lt;Lessons&gt;
           &lt;Lesson&gt;
             &lt;Lesson_name&gt;Learn ABC!&lt;/Lesson_name&gt;
             &lt;Lesson_date&gt;XX/XX/XXXX&lt;/Lesson_date&gt;
           &lt;/Lesson&gt;
  
  
          'WANT TO ADD A LESSON HERE!!!
  
  
        &lt;/Lessons&gt;
     &lt;/Course&gt;
  
     &lt;Course&gt;
        &lt;Name&gt;DEF Course&lt;/Name&gt;
        &lt;Lesson&gt;
          &lt;Lesson_name&gt;Learn DEF!&lt;/Lesson_name&gt;
          &lt;Lesson_date&gt;XX/XX/XXXX&lt;/Lesson_date&gt;
        &lt;/Lesson&gt;
     &lt;/Course&gt;
  
  &lt;/Courses&gt;
  </code></pre>
  
  <p>I would want to insert a lesson with all those nodes such as <code>Lesson</code>, <code>Lesson_date</code>, <code>Lesson_name</code> etc. without affecting the existing lessons and other elements. Is there any simple way?</p>