开发者

Write inside an XML file with Flex

开发者 https://www.devze.com 2023-04-05 05:05 出处:网络
I\'m writing a Flex app which is a kind of light CMS. The front site is using an XML file which contains texts and images links. Is it possible to write some XML inside this existing file from Flex? T

I'm writing a Flex app which is a kind of light CMS. The front site is using an XML file which contains texts and images links. Is it possible to write some XML inside this existing file from Flex? The fileReference allows to save XML content as a new file, but not to write inside an existing one.

The XML looks like:

<?xml version='1.0' encoding='utf-8'?>
<content>

</content>

So I just need to add my new lines between the tags.

Can I do that with Flex? Or should I use PHP? T开发者_JAVA百科hanks


So, you want to write a XML file to the server? If so, you can either use a combination of AS3 and PHP or pure PHP. If you want to use the former, try this: http://www.actionscript.org/forums/showpost.php3?s=a2a3a7d00f9245bc519fe90b4a8194b1&p=743658&postcount=3

If you want to add elements to the XML without rewriting the file, you might want to take a look at the SimpleXML library for PHP: http://de.php.net/manual/en/book.simplexml.php

0

精彩评论

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