0 Replies Latest reply on Dec 15, 2009 7:04 AM by SiHoop

    Best way to manage xml

    SiHoop Level 1

      I want to place xml into a datagrid and I'm using the following event handler to assign the xml coming in from php to the datagrid. The root node is getData and newPerson is the first child. I use ObjectProxy to take into account an xml file that has only one item.

       

      What I want to know is whether there is a simpler way to import xml from a php file?

       

      private function getPeopleResultHandler(event:ResultEvent ) :void {
          if( event.result.getData == null ) {
              peopleColumn = new ArrayCollection
          }else if(event.result.getData.newTeacher is ObjectProxy ) {
              peopleColumn = new ArrayCollection([event.result.getData.newPerson]);
          }else {
              peopleColumn = event.result.getData.newTeacher as ArrayCollection;
          }

      }