2 Replies Latest reply on Aug 2, 2008 6:22 AM by Newsgroup_User

    Specs for XML in AdvancedDataGrid?

    EdwinvD
      Hi All,

      I am trying to get XML-data generated by a PHP-page (based on data out of a MySQL-database) displayed in a AdvancedDataGrid. I cannot get it to work. Comparison with XML-data constructed with a XML-tag in Flex (mx:XML) has taught me that the XML-data needs to be converted to an XMLListCollection in order to get the tree-property of the ADG filled with the XML-data (and thereby displayed in the ADG itself). And for some reason the XML-data coming out of PHP cannot be converted to an XMLListCollection. The ADG fails silently on this but if I try to convert the XML to an XMLListCollection I get a 1034-error. Converting it to an XMLList is no problem.
      So my question is what are the differences between XML/XMLList and the XMLListCollection that I have to take into account for doing a successfull conversion?

      For information. I have generated the XML out of PHP both via a loop for-routine (as regular text so to say) and via the functions of DOCDocument and I have been playing around with the chosen character set but that has not made any difference.

      Hope someone can help,

      Edwin
        • 1. Re: Specs for XML in AdvancedDataGrid?
          Peter Lorent Level 2
          -> Comparison with XML-data constructed with a XML-tag in Flex (mx:XML) has taught me that the XML-data needs to be converted to an XMLListCollection
          hmm, not quit true, if you set the dataprovider to an XML object, the data will be converted to an XMLListCollection with only one item.

          Basically I would expect your xml to be returned as an ArrayCollection (default behaviour) which can serve as the dataprovider for the adg.
          • 2. Re: Specs for XML in AdvancedDataGrid?
            Level 7

            "EdwinvD" <webforumsuser@macromedia.com> wrote in message
            news:g6vqhu$jfr$1@forums.macromedia.com...
            > Hi All,
            >
            > I am trying to get XML-data generated by a PHP-page (based on data out of
            > a
            > MySQL-database) displayed in a AdvancedDataGrid. I cannot get it to work.
            > Comparison with XML-data constructed with a XML-tag in Flex (mx:XML) has
            > taught
            > me that the XML-data needs to be converted to an XMLListCollection in
            > order to
            > get the tree-property of the ADG filled with the XML-data (and thereby
            > displayed in the ADG itself). And for some reason the XML-data coming out
            > of
            > PHP cannot be converted to an XMLListCollection. The ADG fails silently on
            > this
            > but if I try to convert the XML to an XMLListCollection I get a
            > 1034-error.
            > Converting it to an XMLList is no problem.
            > So my question is what are the differences between XML/XMLList and the
            > XMLListCollection that I have to take into account for doing a successfull
            > conversion?
            >
            > For information. I have generated the XML out of PHP both via a loop
            > for-routine (as regular text so to say) and via the functions of
            > DOCDocument
            > and I have been playing around with the chosen character set but that has
            > not
            > made any difference.

            Try XML>XMLList>XMLListCollection.

            HTH;

            Amy