<div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CUsers%5Cmeriem%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><style>
&lt;!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:&quot;&quot;;
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:&quot;Times New Roman&quot;;
        mso-fareast-font-family:&quot;Times New Roman&quot;;}
span.EmailStyle15
        {mso-style-type:personal;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
--&gt;
</style>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">I want to delete an element from xml-file. this is my
code but the file dosen't change when I test it.</span></b></p>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">&nbsp;</span></b></p>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">&nbsp;</span></b></p>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">public</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> </span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">static</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> String
supp(){</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">try</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">{</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);" lang="EN-GB">racine</span></i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">=</span><i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);" lang="EN-GB">document</span></i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">.getRootElement();</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Element
rac=</span><i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);" lang="EN-GB">racine</span></i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">.getChild(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);" lang="EN-GB">&quot;voitures&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">);</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp; </span>List<span style="">&nbsp;&nbsp;
</span>listelt = rac.getChildren();</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;</span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">int</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> ok=1;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp; </span>Iterator i = listelt.iterator();</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">while</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">(i.hasNext()&amp;&amp;
ok==1)</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp; </span><span style="">&nbsp;</span><span style="">&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span>Element courrent = (Element)i.next();</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span></span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">if</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> (courrent.getAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);" lang="EN-GB">&quot;immatricule&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">).getValue().equals(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);" lang="EN-GB">&quot;8345 tU 125&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">)){</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;</span>System.</span><i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);" lang="EN-GB">out</span></i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">.println(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);" lang="EN-GB">&quot; &quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">+courrent.getAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);" lang="EN-GB">&quot;immatricule&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">).getValue());</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(63, 127, 95);" lang="EN-GB">//Element
free = (Element)courrent.detach();</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;</span>System.</span><i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);" lang="EN-GB">out</span></i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">.println(rac.getName());</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">rac.<span style="background: silver none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">removeContent</span>(courrent);</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span>ok=0;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(63, 127, 95);">//courrent.removeChild(couleur);</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span>System.</span><i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">out</span></i><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.println(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;supprimé&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span>}</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp; </span>}}</span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">catch</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">(Exception
e){</span><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);" lang="EN-GB">return</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> e.getMessage();}</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB"></span></p>


<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;</span></p>

</div>