XML的创建
声明
/// <summary>
/// XML文档
/// </summary>
XmlDocument xmldoc;
/// <summary>
/// XML节点
/// </summary>
XmlNode xmlnode;
/// <summary>
/// XML元素
/// </summary>
XmlElement xmlelem;
XmlElement xmlelem2;
XmlElement xmlelem3;
/// <summary>
/// XML内容
/// </summary>
XmlText xmltext;
/// <summary>
/// 基本路径(个人文件夹管理XML)
/// </summary>
public static string basicPath = ControlsClass.GetPath(true) + "\\temp\\XMLFile.xml";
if (!File.Exists(basicPath))
{
//创建声明
&n
相关文档:
gloox自己实现了xml的解析模块,没有用到第三方的库(tinyXML,expat )
主要涉及的文件:
tag.h (tag.cpp)
taghandler.h
parser.h (parser.cpp)
1. Tag一个Tag就是一个XML元素
例如:
a.
<book kind='computer'>
<store id='23'/>
<author>
qiang
</author>
</bo ......
如何在Sqlserver中从外部XML文件中读取配置信息呢?该问题源自一家企业的笔试信息有感。
一xml文件内容:
<?xml version="1.0" encoding="utf-8"?>
<root>
<db name="ClientDB1" datasize="512MB" datagrowth="100MB" logsize="100MB" loggrowth ="50MB">
</db>
<db ......
wsdl.xml文件
<?xml version="1.0" encoding="UTF-8" ?>
<definitions name="MobilePhoneService"
targetNamespace="www.mobilephoneservice.com/MobilePhoneService-interface"
xmlns="http://schemas.xmlsoap.org/wsdl/"
  ......
book_schema.xml文件
<?xml version="1.0" encoding="gb2312"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="丛书">
<xs:complexType>
<xs:sequence>
<xs:element name="书">
&n ......
test.html
———————————————————————————————————————& ......