
XmlElement el=xmlDoc.CreateElement("person")//添加person节点
el.SetAttribute("name","风云")//添加person节点的属性"name"
el.SetAttribute("sex","女") //添加person节点的属性 "sex"
el.SetAttribute("age","25") //添加person节点的属性 "age"
XmlElement xesub1=xmlDoc.CreateElement("pass")//添加person节点的里的节点
xesub1.InnerText="123"//设置文本节点
el.AppendChild(xesub1)
XmlElement xesub2=xmlDoc.CreateElement("Address")
xesub2.InnerText="昆明"//设置文本节点
el.AppendChild(xesub2)
xmldocSelect.AppendChild(el)
xmlDoc.Save(Server.MapPath("user.xml"))
var _xml:XML=你的xmlfunction vote(e:Event):void
{
var n:Number = Number(_xml.image[0].@counts)
_xml.image[0].@counts = n+1
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)