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
相关文档:
<mce:script language="javascript" type="text/javascript"><!--
//需要读取的xml文件
var uRl = "jsReadXml.xml";
var xmlDoc;
//初始化,给上述定义变量赋值
// function showcurcity(){
if(window.ActiveXObject)
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM&q ......
--英文
mxmlc -locale=en_US -allow-source-path-overlap=true
-include-resource-bundles=mf,collections,containers,controls,core,effects,formatters,logging,SharedResources,skins,states,styles,validators
-source-path=D:/UBAS_HOME/ClientCode/demo/client/code/MainFrame/assets/locale/en_US
-output=E:/ ......
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 ......
扩展标记语言XML(eXtensible Markup Language),是由W3C组织制定的。做为用于替代HTML语言的一种新型的标记语言,XML内部有着很多基本标准,XML就是通过与这些相关标准地结合,应用于科学计算、电子出版、多媒体制作和电子商务的。C#作为一种新型的程序语言,是.Net框架的一个重要组成部分,他和XML的关系颇深。本文就从 ......
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
......