title: deleting children from XML variable
body: <p>Having a problem manipulating some XML with ActionScript in Flex 4.6</p>
  
  <p>Here's my XML variable contents:</p>
  
  <pre><code>var employeeXML:XML contains
  
      &lt;salesforce&gt;
         &lt;salesman&gt;
            &lt;id&gt;42&lt;/id&gt;
            &lt;territory&gt;OJAI&lt;/territory&gt;
         &lt;/salesman&gt;
      &lt;/salesforce&gt;
  </code></pre>
  
  <p>Here's my ActionScript:</p>
  
  <pre><code>idToMerge = "42";
  delete employeeXML.salesman.(id == idToMerge);
  </code></pre>
  
  <p>Here's my error:</p>
  
  <pre><code> TypeError: Error #1119
  </code></pre>
  
  <p>What's the proper way to delete the  who's  is 42 from an XML variable?</p>