The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: Convert chlid nodes to var

  1. #1

    Convert chlid nodes to var

    Hi, I tried the last 3 hours to convert child nodes to variables.

    I followed the tutorial on

    I use the following (working) code:
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("language.xml"));
    function LoadXML(e:Event):void {
    xmlData = new XML(;
    function ParseLanguages(LanguagesInput:XML):void {
    trace("XML Output");
    var languageList:XMLList = LanguagesInput.Language.(Country == "CtryNo=752&LangNo=46");
    My output is:
    <Language lang="Sweden">
      <Link>Länk till produktsida</Link>
      <CompBat>Kompatibelt med följande batterier</CompBat>
      <CompDev>Kompatibelt med följande apparater</CompDev>
    Now I try to assign variables to each child (Country, Search, Link, etc). But I don't seem to succeed with that.

    I tried different approaches like:

    • var test = languageList.Country
    • var test = e.item.Country

    In my xml file I have 8 languages. I'm grateful for any help I can get :-)

  2. #2
    Registered User
    Here is a pretty thorough tutorial for you..

  3. #3
    Thanks!!! That was exactly what I needed :-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012