zoukankan
html css js c++ java
xml
<
Login
>
<
id userName
=
"
Tushar
"
passWord
=
"
Tushar
"
>
<
Name
>
Tushar
</
Name
>
<
Age
>
24
</
Age
>
</
id
></
Login
>
Code
using
System;
using
System.Xml;
class
Test{
static
void
Main() { XmlDocument doc
=
new
XmlDocument(); XmlElement root
=
doc.CreateElement(
"
Login
"
); XmlElement id
=
doc.CreateElement(
"
id
"
); id.SetAttribute(
"
userName
"
,
"
Tushar
"
); id.SetAttribute(
"
passWord
"
,
"
Tushar
"
); XmlElement name
=
doc.CreateElement(
"
Name
"
); name.InnerText
=
"
Tushar
"
; XmlElement age
=
doc.CreateElement(
"
Age
"
); age.InnerText
=
"
24
"
; id.AppendChild(name); id.AppendChild(age); root.AppendChild(id); doc.AppendChild(root); doc.Save(
"
test.xml
"
); }}
查看全文
相关阅读:
Python:三元运算
SaltStack部署服务及配置管理apache+php-第二篇
SaltStack介绍及简单配置-第一篇
git基础常用维护命令
MySQL设置只读模式
运维杂记-05
Tomcat的配置,设置内存,获取用户IP
Linux系统巡检项目
Redis维护
nginx配置文件说明
原文地址:https://www.cnblogs.com/lixinsheng/p/1494800.html
最新文章
javascript 浏览器定位
Ehcahe spring
linux中设置虚拟域名
Echarts 自定义数据视图
Echarts 折线类型
Jenkins ant打包部署
Linux ct6.5安装rabbitmq
easyapi
spring 整合rabbitMQ
ElasticSearch java api -单例模式
热门文章
jquery 小知识
Python:装饰器的简单理解
Python:文件操作总结1——文件基本操作
Python:集合操作总结
Python:字典操作总结
Python:内建函数zip
Python:字符串操作总结
Pyhont:内建函数enumerate
Python:元组操作总结
Python:列表操作总结
Copyright © 2011-2022 走看看