flex学习 flex读取xml文件
源xml文件
<?xml version="1.0" encoding="iso-8859-1"?>
<books>
<stock>
<name>The Picasso Code</name>
<author>Dan Blue</author>
<category>Fiction</category>
<description>Cubist paintings reveal a secret society of people who really look like that</description>
</stock>
<stock>
<name>Here With the Wind</name>
<author>Margaret Middle</author>
<category>Fiction</category>
<description>In this edition, nobody in the south really gives a damn</description>
</stock>
<stock>
<name>Harry Potluck and the Chamber of Money</name>
<author>J.K. Roughly</author>
<category>Fiction</category>
<description>Young wizard finds the real pot-of-gold and retires</description>
</stock>
<stock>
<name>No Expectations</name>
<author>Chuck Dickens</author>
<category>Fiction</category>
<description>Dickens finally reveals what he really thinks of people</description>
</stock>
<stock>
<name>Atlas Stretched</name>
<author>Ann Rind</author>
<category>Fiction</category>
<description>Great inventors finally just take the money and run</description>
</stock>
<stock>
<name>Recycling Software</name>
<author>Big Gates</author>
<category>Nonfiction</category>
<description>How to just change the name and interface of the same old software and sell it as new</description>
</stock>
<stock>
<name>Make Tons of Money</name>
<author>Donald Rump</author>
<category>Nonfiction</category>
<description>Rump explains how he became a billionaire while constantly declaring bankruptcy</desc
相关文档:
关于states
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.effects.easing.Bounce;
]]>
</mx:Script>
<mx:states>
<mx:State name="bookDetails" ......
books.xml:
Xml代码
<?xml version="1.0" encoding="UTF-8"?>
<books>
<!--This is a test for dom4j, jakoes, 2007.7.19-->
<book show="yes" ......
1、首先下载 xstream.jar和jettison.jar(转换为json时用到),并引入该包。
2、看如下代码吧:
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import c ......
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
......
■ 开发前要求配置
■ Select XML格式数据
■ Insert XML格式数据
■ Updata XML格式数据
■ Delete XML格式数据
开发前要求配置
必须安装Oracle客户端
把Classpath指向
classes111.zip ......