开发者

Flex - How to edit a xml file on the server

开发者 https://www.devze.com 2022-12-26 13:50 出处:网络
I was wondering if it was possible to edit an xml on the server side from a web based flex application.

I was wondering if it was possible to edit an xml on the server side from a web based flex application. When you use XML files in a Flex application and then compile it to upload it in the server, Flex Buidler generates a swf file with the xml data开发者_StackOverflow中文版 embedded. How should I do to have access to those XML files??

Thanks for your answers.

Regards. BS_C3


If I understand your question you're using a XML mxml tag that embeds the XML. Try to use a URLLoader instead. Maybe like this:

var xmlLoader:URLLoader = new URLLoader();
        var myXml:XML;

        function init():void
        {
            xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
            xmlLoader.load(new URLRequest('teste.xml'));
        }
        function xmlLoaded(e:Event):void
        {
            myXml = new XML(e.target.data);
        }


You can load the content but you cannot save it back directly from Flash without calling some server side method. You should pass the new content (or delta) as a parameter to this method on the server side.

0

精彩评论

暂无评论...
验证码 换一张
取 消