I have a xml file which I want to open and write in. The xml file has this structure:
 <?xml version="1.0" encoding="UTF-8"?>        
   <polygons>               
     <polygon name="polygon-1">        
         <point>    
            <x>38,241885</x>    
            <y>-5,965407</y>    
         </point>    
          <point>        
            <x>38,242251</x>        
            <y>-5,965423</y>        
         </point>        
    </polygon>
    <polygon name="polygon-2">
        .
        .
    </polygon>
  </polygons>   
I want to add new polygons into my xml, so I have to read it and then add a polygon at the last position. ¿How can I do this?
 
     
    