3 Replies Latest reply on Oct 24, 2008 3:51 PM by Newsgroup_User

    XML & Binding to mx:label

    Jim Daniel Level 1
      Hi,

      I'm attempting to bind XML file entires (see XML file below) to <mx:Label/> (see code below). It seems that I can not see any of the child nodes in the XML file. Were can i find out how this is done or can someone tell me how?
        • 1. Re: XML &amp; Binding to mx:label
          Level 7

          "Jim Daniel" <webforumsuser@macromedia.com> wrote in message
          news:gdtfpk$s41$1@forums.macromedia.com...
          > Hi,
          >
          > I'm attempting to bind XML file entires (see XML file below) to
          > <mx:Label/>
          > (see code below). It seems that I can not see any of the child nodes in
          > the
          > XML file. Were can i find out how this is done or can someone tell me
          > how?
          >
          > <?xml version="1.0"?>
          > <Adoptees>
          > <Fox1>
          > <image>
          > assets/foxone.png
          > </image>
          > <header>
          > Red Fox
          > </header>
          > <commonality>
          > Common
          > </commonality>
          > <Location>
          > MOst Map Locations
          > </Location>
          > </Fox1>
          > <Fox2>
          > <image>
          > assets/foxtwo.png
          > </image>
          > <header>
          > Forest Fox
          > </header>
          > <commonality>
          > Regional
          > </commonality>
          > <Location>
          > South America
          > </Location>
          > </Fox2>
          > <Fox3>
          > <image>
          > assets/foxthree.png
          > </image>
          > <header>
          > Artic Fox
          > </header>
          > <commonality>
          > Regional
          > </commonality>
          > <Location>
          > North America
          > </Location>
          > </Fox3>
          > <Fox4>
          > <image>
          > assets/foxfour.png
          > </image>
          > <header>
          > Japan: Kitsune
          > </header>
          > <commonality>
          > Rare
          > </commonality>
          > <Location>
          > Asia
          > </Location>
          > </Fox4>
          > </Adoptees>

          When you're referring to this XML, you should not refer to the Adoptees
          node. That IS the xml. Instead
          {AFData.Fox1.header}

          HTH;

          Amy


          • 2. Re: XML &amp; Binding to mx:label
            Jim Daniel Level 1
            Thanks Amy, that did the trick. I had a feelin' that the problem was something simple that a neebie could miss.
            • 3. Re: XML &amp; Binding to mx:label
              Level 7

              "Jim Daniel" <webforumsuser@macromedia.com> wrote in message
              news:gdthj8$134$1@forums.macromedia.com...
              > Thanks Amy, that did the trick. I had a feelin' that the problem was
              > something simple that a neebie could miss.

              :-)

              I'll try to add it to the FAQ over the weekend.