XML创建、读、写操作
Create:
int nFQ;
XmlDocument doc = new XmlDocument();
XmlAttribute
newAtt;
//定义XML文档头文件
XmlDeclaration dec =
doc.CreateXmlDeclaration("1.0",null,null);
doc.AppendChild(dec);
XmlElement
docRoot = doc.CreateElement("Orders");
doc.AppendChild(docRoot);
for(int i=0;i<12;i++)
{
XmlNode Order =
doc.CreateElement("Order");
newAtt =
doc.CreateAttribute("Quantity");
nFQ = 10*i +i;
newAtt.Value
= nFQ.ToString();
Order.Attributes.Append(newAtt);
docRoot.AppendChild(Order);
}
//
保存XML文档
string strPath = Server.MapPath("OutDocument.XML");
doc.Save(strPath);
Read:
一:
// 创建XmlDocument类的实例
XmlDocument doc = new XmlDocument();
ArrayList
NodeValues = new ArrayList();
// 把people.xml文件读入内存,形成一个DOM结构
doc.Load(
Server.MapPath("people.xml") );
XmlNode root =
doc.DocumentElement;
foreach( XmlNode personElement in
root.ChildNodes )
//吧节点加入数组
NodeValues.Add(personElement.FirstChild.Value);
//在ListBox中显示
XMLNodeListBox.DataSource = NodeValues;
XMLNodeListBox.DataBind();
二:
//读取XML到DataSet
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath(".\\db\\dbGuest.xml"));
GridView1.Dat
相关文档:
FusionCharts 的 XML标签属性有一下四种数据类型
* Boolean - 布尔类型,只能为1或者0。例如:<graph showNames=’1′ >
* Number - 数字类型,只能为数字。例如:<graph yAxisMaxValue=’200′ >
* String - 字符串类型,只能为字符串。例如: <graph caption=’My Chart&r ......
在使用Goddady主机使用
Google XML
Sitemaps插件的时候,总提示无权限,而实际上我是了权限的,把插件下载到本地,也是可以正常生成sitemap的,怎么办?自然不能难倒咱
Iter。
检索多方检查,发现在服务器上,检查路径一项为sitemap.xml,而在本地,检查路径
为d:\workstation\site\iove.net\sitemap.xml,也就是说 ......
JAXBContext jc = JAXBContext.newInstance(ICPBuildSummaryXO.class);
Unmarshaller u = jc.createUnmarshaller();
ICPBuildSummaryXO xo = (ICPBuildSummaryXO) u.unmarshal(node);
ICPBuildSummary summary = new ICPBuildSummary();
Bean ......
在前面我们学习了使用Glib的高程捆绑方式的method的收发,现在学习singal的收发,xml例子如下
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/com/wei/MyObject">
<interface name="com.wei.MyObject.Sample">
< ......
简单的类,简化自己读取xml的过程
ReadXML.as
package
{
import flash.display.Sprite;
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.system.System;
import flash.events.EventDis ......