It is "better" to use the createXML() utility function because it tells
the parser to ignore whitespace.  If you have carriage returns in your
xml string and do not tell the compiler to ignore whitespace, the xml
will not work well with the tree control.

Tracy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Erik Westra
Sent: Wednesday, April 20, 2005 7:51 AM
To: [email protected]
Subject: RE: [flexcoders] string to xml -> datagrid


To create XML from a string u can just do this:

var xml:XML = new XML(str);

Then u can use an xmlToObject coverter to convert the xml object to an
object wich consists of arrays and objects. I believe there is a
macromedia utility available for this.

Greetz Erik
 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of core_elements
Sent: woensdag 20 april 2005 13:41
To: [email protected]
Subject: [flexcoders] string to xml -> datagrid



Hi I don't know if this is possible.

I have an soap-function that returns a string. The content of the
string:

<tickets><ticket><ticketID>1</ticketID></ticket><ticket><ticketID>2</
ticketID></ticket></tickets>

Of course this is just a string. Is it possible to convert the string to
an xml object and then bind that object to a datagrid?

I did found this :

                        var xmlStr:String;
                        xmlStr=ticketsService.getTickets.result;
                        
                        var xml:XML;
                        xml=mx.utils.XMLUtil.createXML(xmlStr);


but I don't know if this is the right way ... 






 
Yahoo! Groups Links



 






 
Yahoo! Groups Links



 







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to