Problem with ApplicationProperties serialization

I must have missed something but when I serialize my app properties, the XML is escaped and written as an attribute instead of being written as a tree. This behaviour happens only under windows, Mac version works fine . 

The code : 


  ScopedPointer<XmlElement> xml( mData.createXml() );
  mAppProperties.getUserSettings()->setValue("Preferences", xml);
 

The result : 


<?xml version="1.0" encoding="UTF-8"?>
<PROPERTIES>
  <VALUE name="Preferences" val="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Settings&gt;&lt;MidiOutput0 name=&quot;LoopBe Internal MIDI&quot;/&gt;&lt;MidiOutput1/&gt;&lt;MidiOutput2/&gt;&lt;MidiOutput3/&gt;&lt;MidiOutput4 name=&quot;LoopBe Internal MIDI&quot;/&gt;&lt;MidiOutput5/&gt;&lt;MidiOutput6/&gt;&lt;MidiOutput7/&gt;&lt;Inputs&gt;&lt;FA-66MIDIIN/&gt;&lt;LoopBeInternalMIDI/&gt;&lt;NovationImpulse active=&quot;1&quot;/&gt;&lt;MIDIIN2(NovationImpulse)/&gt;&lt;MaschineMK2In/&gt;&lt;/Inputs&gt;&lt;/Settings&gt;"/>
  <VALUE name="Mappings">
    <KEYMAPPINGS basedOnDefaults="1"/>
  </VALUE>
</PROPERTIES>
 

Now, for the "Mappings" par I use the same kind of code and it works as expected.

The code :  


  ScopedPointer<XmlElement> xml( mKeyPressMappingSet.createXml(true) );
  mAppProperties.getUserSettings()->setValue("Mappings", xml);
 

The result (which can also be seen above) : 

  <VALUE name="Mappings">
    <KEYMAPPINGS basedOnDefaults="1"/>
  </VALUE>

Do you have an idea of what is wrong ?