E4X in AS3 allows true embedded XML, like so:
var some_xml:XML = <some>xml</some>;
AS2 doesn't support that format, so you could do:
var some_xml:XML = new XML("<some>xml</some>");
or:
var some_xml:XML = new XML();
some_xml.parseXML("<some>xml</some>");
or use the MXML <mx:XML> tag which will embed XML.
----- Original Message -----
From: "Stanislav Zayarsky" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, December 26, 2005 1:24 PM
Subject: Re: [flexcoders] How to embed XML in AS3?
> I want to konw how to embed XML in AS2? Is xml MIME type?
Let's try the next thing: create XML element in mxml and before this
set in flex-config.xml file
"<keep-generated-as>true</keep-generated-as>". and then compile mxml.
Then open generated *.as file and see what is there.
>From there we can take this script:
var myXML:XMLNode;
function createXML() {
myXML = mx.utils.XMLUtil.createXML("<document>\n <data/>\n</document>");
}
By this way we can manually embed XML file via ActionScript.
Or I'm not right?
On 12/26/05, Manish Jethani <[EMAIL PROTECTED]> wrote:
> On 12/24/05, flexhtoo <[EMAIL PROTECTED]> wrote:
>
> > I want to konw how to embed XML in AS2? Is xml MIME type?
>
> I don't think there's a way to embed XML in ActionScript. You'll have
> to use the "XML" element in MXML.
>
> Manish
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
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/