title: In AS3 how XML Node value use as another node?
body: <p>Suppose I have an XML</p>
  
  <pre><code>&lt;xml&gt;
  
  &lt;lang&gt;en&lt;/lang&gt;
  &lt;en&gt;
      &lt;text id="123"&gt;One Two Three&lt;/text&gt;
      &lt;text id="hello"&gt;Hello&lt;/text&gt;
  &lt;/en&gt;
  
  &lt;/xml&gt;
  </code></pre>
  
  <p>the "en" tag is only if the lang value is "en".
  If the value of lang is "de"</p>
  
  <pre><code>&lt;lang&gt;de&lt;/lang&gt;
  &lt;de&gt;
          &lt;text id="123"&gt;One Two Three&lt;/text&gt;
          &lt;text id="hello"&gt;Hello&lt;/text&gt;
  &lt;/de&gt;
  </code></pre>
  
  <p>How do I get this name dinamicaly in my actionscript 3 code.</p>
  
  <p>Suppose I want to use</p>
  
  <pre><code>var xmlVal = new XML(... the above xml)
  var lang = xmlVal.lang;
  </code></pre>
  
  <p>I can't use if (xmlVal.lang == "en") .. because the lang value can be any string. but there should be a child node in that name..!!</p>
  
  <p>How do I get values from node "en or de or what ever.." ??</p>