title: Flex: Replacing a node in a XML object
body: <p>I have looked at some of the related posts on this subject but i can't figure out how to solve my problem. I guess it has something to do with the fact that its monday.</p>
  
  <p>Well, here goes. i have a XML object containing:</p>
  
  <pre><code>&lt;root&gt;
     &lt;page&gt;
        &lt;text&gt;
           &lt;style properties=""/&gt;
           &lt;label&gt; Text one&lt;/label&gt;
        &lt;/text&gt;
        &lt;text&gt;
           &lt;style properties=""/&gt;
           &lt;label&gt; Text two&lt;/label&gt;
        &lt;/text&gt;
     &lt;/page&gt;
     &lt;page&gt;
        &lt;text&gt;
           &lt;style properties=""/&gt;
           &lt;label&gt; Text three&lt;/label&gt;
        &lt;/text&gt;
        &lt;text&gt;
           &lt;style properties=""/&gt;
           &lt;label&gt; Text four&lt;/label&gt;
        &lt;/text&gt;
     &lt;/page&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>And i want to replace only the label node with a new one. i put the new ones in an XMLList but now im stuck at how im supose to replace the actual nodes. This is how the XMLList looks like:</p>
  
  <pre><code>&lt;page&gt;
     &lt;text&gt;
        &lt;style properties=""/&gt;
        &lt;label&gt; Replace the first one&lt;/label&gt;
     &lt;/text&gt;
     &lt;text&gt;
        &lt;style properties=""/&gt;
        &lt;label&gt; Replace the second one&lt;/label&gt;
     &lt;/text&gt;
  &lt;/page&gt;
  &lt;page&gt;
     &lt;text&gt;
        &lt;style properties=""/&gt;
        &lt;label&gt; Replace the third one&lt;/label&gt;
     &lt;/text&gt;
     &lt;text&gt;
        &lt;style properties=""/&gt;
        &lt;label&gt; Replace the fourth one&lt;/label&gt;
     &lt;/text&gt;
  &lt;/page&gt;
  </code></pre>