1 Reply Latest reply on May 26, 2011 1:02 PM by Flex harUI

    XML attribute named class causing problems

    iamcootis Level 1

      I am reading in some XML that has an attribute called class.My code looks like this:

       

      for each(var componentXML:XML in evt.receivedXML.presetNames.component){
                          var component:Component = new Component();
                          component.type = componentXML.@type;
                          component.id = componentXML.@id;
                          var cClass = componentXML.@class;
                          component.label = componentXML.label.string;
                          component.description = componentXML.description.string;
                          componentList.addItem(component);
                      }

       

      There is a problem with the word class as it says "expecting identifier before class"

       

      I'm being told that we cannot change the name of the attribute. Is there any way I can get around this issue?