2 Replies Latest reply on Jan 1, 2013 11:43 AM by M.G.S.

    XML reading problem

    M.G.S. Level 1

      Hi;

       

      I have a basic XML file.

       

      <?xml version="1.0"  encoding="UTF-8"?>

      <ams>

                <settings>

                          <servicesname>telephony</servicesname>

                          <rtmpurl>rtmp://192.168.92.31/telephony</rtmpurl>

                          <codec>nm22k</codec>

                </settings>

      </ams>

       

      I want to assign 3 variables XML to flax.

       

      How can i read this XML variables with flex ??

        • 1. Re: XML reading problem
          Supreet R

          Hi MGS,

           

          var xml:XML =

          <ams>

                    <settings>

                              <servicesname>telephony</servicesname>

                              <rtmpurl>rtmp://192.168.92.31/telephony</rtmpurl>

                              <codec>nm22k</codec>

                    </settings>

          </ams>;

           

          You can read the above XML using the following code:

           

          var sname:String = xml..servicesname; //holds the value "telephony"

          var rurl:String = xml..rtmpurl; //holds the value "rtmp://192.168.92.31/telephony"

          var cod:String = xml..codec; //holds the value "nm22k"

          • 2. Re: XML reading problem
            M.G.S. Level 1

            Thank you very much