2 Replies Latest reply on Sep 30, 2009 4:07 AM by satyamurthy_hyd

    How to extract xml tag name contains dashes

    satyamurthy_hyd Level 1
        
      Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
      XML Input is: <regular-body>Text of my post...</regular-body>

      expected output is : regular-body
      I appreciate any of your suggestions or inputs
        • 1. Re: How to extract xml tag name contains dashes
          bfd02886 Level 1

          Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".

           

          If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:

           

          image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]

           

          I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.

           

          If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

          • 2. Re: How to extract xml tag name contains dashes
            satyamurthy_hyd Level 1

            Hi,

            Thanks for the Response.

            Actually looking for retrieving  name of the tag  not its value.

             

            Regards

            CSNPrasad.