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.
精彩评论