易截截图软件、单文件、免安装、纯绿色、仅160KB

XML TO ArrayCollection 两种实现方式

<?xml version="1.0" encoding="UTF-8"?>
<projects>
<node Country="暗暗啊" Gold="10" Silver="20" Bronze="30"/>
<node Country="白斑病" Gold="30" Silver="20" Bronze="10"/>
<node Country="常常厂" Gold="20" Silver="40" Bronze="60"/>
<node Country="赌东道" Gold="50" Silver="30" Bronze="10"/>
<node Country="饿饿额" Gold="15" Silver="18" Bronze="46"/>
<node Country="方法法" Gold="61" Silver="52" Bronze="38"/>
</projects>
<mx:HTTPService id="HTTPService1"
url="charts_ColumnChart.xml"
result="initFile(event)" showBusyCursor="true" method="post"
resultFormat="e4x"/>
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
private var ac:ArrayCollection = new ArrayCollection();
function initFile(event:ResultEvent):void{
for each(var p:XML in event.result..node){
var obj:Object=new Object();
obj.Country=p.@Country;
obj.Gold=p.@Gold;
obj.Silver=p.@Silver;
obj.Bronze=p.@Bronze;
ac.addItem(obj);
}
}
二:
复制代码 代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<projects>
<node>
<Country>暗暗a</Country>
<Gold>10</Gold>
<Silver>20</Silver>
<Bronze>30</Bronze>
</node>
<node>
<Country>暗b啊</Country>
<Gold>10</Gold>
<Silver>20</Silver>
<Bronze>30</Bronze>
</node>
<node>
<Country>暗c啊</Country>
<Gold>10</Gold>
<Silver>20</Silver>
<Bronze>30</Bronze>
</node>
</projects>
<mx:HTTPService id="HTTPService2"
url="charts_ColumnChart1.xml"
result="initFile1(event)" showBusyCursor="true" method="post"
resultFormat="e4x"/>
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
private var ac1:ArrayCollection = new ArrayCollection();
function initFile1(event:ResultEvent):void{
for each(var p:X


相关文档:

XML 中,有 5 个预定义的实体引用:


&lt;
<
小于
&gt;
>
大于
&amp;
&
和号
&apos;
'
单引号
&quot;
"
引号
 
注释:在 XML 中,只有字符 "<" 和 "&" 确实是非法的。大于号是合法的,但是用实体引用来代替它是一个好习惯。 ......

基于XML的Web分布式数据交换技术

一、WDDX的产生
    WDDX,英文全称为Web Distributed Data
Exchange,是一种基于XML的Web分布式数据交换技术。WDDX最早是美国Allaire公司的程序技术设计师Simeon
Simeonov为了解决ColdFusion中涉及到的分布计算问题而建立的。随着工作的开展,WDDX逐渐演变成为一种可用于不同的应用环境中交换复杂的结构 ......

.NET SQLServer2005 XML字段

//这是添加 
private void button1_Click(object sender, EventArgs e)
        {
            string s = "Persist Security Info=False;Integrated Security=SSPI;database=IIntegration;server=(local)";
 &n ......

Whitespace is not allowed before an XML Processing

转:http://hi.baidu.com/oneshotonekill/blog/item/be68b513f7c929d7f6039e1e.html
Whitespace is not allowed before an XML Processing Instruction (< ? ... ?>). HTMLComponent.Eclipse在编辑mxml的时候提示这样的错误。检查才发现代码中在<? ?>之前存在空格。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号