1 Reply Latest reply on Apr 20, 2007 6:02 AM by chitrapriyaa

    Read specific tag from XML

    Blue_Pixel
      Hello,

      I have an xml that looks like this:
      <objects>
      <object>
      <name>mouse</name>
      <size>small</size>
      <color>black</color>
      </object>
      <object>
      <name>keyboard</name>
      <size>small</size>
      <color>white</color>
      </object>
      </objects>

      I want to read, for example, data from the object named "mouse" . How can I do this?
      Please give me an idea.
      Thank you,
      Tudor
        • 1. Re: Read specific tag from XML
          chitrapriyaa
          Tudor

          You can get a specific tag by mentioning the index like
          var myXml:XML=
          <objects>
          <object>
          <name>mouse</name>
          <size>small</size>
          <color>black</color>
          </object>
          <object>
          <name>keyboard</name>
          <size>small</size>
          <color>white</color>
          </object>
          </objects>

          myXml.object[0]--u will get the first xml data