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

Loading XML data using ActionScript 3.0

Loading XML data using ActionScript 3.0
By Blue_Chi | Flash CS3 | ActionScript 3.0 | Beginner
Using XML is one of the best ways for structuring external content in a logical format that is easy to understand, process, and update. This tutorial will teach you the basics on how to load and process XML in Flash using ActionScript 3.0. You are assumed to have basic knowledge of ActionScript in order to follow this tutorial.
This tutorial is for working with XML in ActionScript 3.0. If you would like to learn how to work with XML in ActionScript 1/2 then please review our previous Flash XML tutorial.
Our tutorial will be divided into the following short sections:
What is XML?
Writing an XML File for Flash.
Loading XML in Flash.
Processing XML in Flash.
What is XML?
XML stands for Extensible Markup Language, it is a markup language used to structure data logically using tags that look very similar to HTML. However, when using HTML you use existing tags to create your web pages, but in XML you create you own tags which you later use in your program the way you choose. This makes it easy to create tags which are descriptive of your project and understandable by any human being. For example, you do not need any preliminary knowledge about XML or the program that uses it to figure out the purpose of the sample code below:
<?xml version="1.0" encoding="utf-8"?>
<GALLERY>
<IMAGE TITLE="school">image1.jpg</IMAGE>
<IMAGE TITLE="garden">image2.jpg</IMAGE>
<IMAGE TITLE="shop">image3.jpg</IMAGE>
</GALLERY>
As you just saw, XML makes it possible for authors to create and name their tags in whatever form they choose as long as they adhere to the basic rules of the language. Another main feature of any XML document is that the tags of an XML document define elements which are structured in a parent/child manner, where each tag may have a number of children tags but only one parent.
Moving on the actual content


相关文档:

XML 命名空间(XML Namespaces)


XML 命名空间可提供避免元素命名冲突的方法。
命名冲突
由于 XML 中的元素名是预定义的,当两个不同的文档使用相同的元素名时,就会发生命名冲突。
这个 XML 文档携带着某个表格中的信息:
<table>
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</ta ......

java读取xml的4种方法

本文介绍Java读取xml文件的四种方法。
  xml文件:
  Xml代码
  <?xml version="1.0" encoding="GB2312"?> 
  <RESULT>
  <VALUE>
  <NO>A1234</NO>
  <ADDR>河南省郑州市</ADDR>
  </VALUE>
  <VALUE>
  < ......

代码修改XML标签

一、问题描述:
一个XML文档,名为OriginXml.xml,示例数据如下:
 <?xml version="1.0" encoding="utf-8"?>
<Class>
<student id="2001001">
<name>张三</name>
<age>18</age>
<scores>
<语文>79</语文>
<数学&g ......

sqlserver FOR XML PATH 语句的应用

代码如下:

DECLARE
@TempTable table(UserID int , UserName nvarchar(50));
insert into
@TempTable (UserID,UserName) values (1,'a')
insert into @TempTable
(UserID,UserName) values (2,'b')

select UserID,UserName
from @TempTable FOR XML PATH
运行这段脚本,将生成如下结果:
复制代码 ......

magento 开发 另一种方式用xml来布局

是否厌倦了用xml文件来做Magento的页面布局,是的话来试试下面这种方式,把布局代码写到controller 里面
public function mycoolAction()
{
/* ... Some code ...*/
$update = $this->getLayout()->getUpdate();
/* ... Some code ...*/
$this->addActionLayoutHandles();
/* ... Some code ...*/
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号