C#小Tip:Xml操作简明手册 1
1)Xml文档示例(xmlsample.xml):
Code
<?xml version="1.0" encoding="iso-8859-1" ?>
<music>
<song title="Oh,girl">
<artist>The Chi-lites</artist>
<genre>Soul</genre>
<album>A lonely man</album>
<year>1972</year>
</song>
<song title="What if">
<artist>Babyface</artist>
<genre>R&B</genre>
<album>unknown</album>
<year></year>
</song>
<song title="How come,how long">
<artist>Babyface</artist>
<genre>R&B</genre>
<album>The essential babyface</album>
<year>2001</year>
</song>
<song title="Drama,love &'lationship">
<artist>Babyface</artist>
<genre>R&B</genre>
<album>Grown and sexy</album>
<year>2005</year>
</song>
<song title="Burning">
<artist>Maria Arredondo</artist>
<genre>Pop</genre>
<album>Not going under</album>
<year>2004</year>
</song>
<song title="Run">
<artist>Leona Lewis</artist>
<genre>Pop</genre>
<album>Unknown</album>
<year>2008</
相关文档:
1
<asp:UpdatePanelID="UpdatePanel1"
UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<asp:Button ID="Button1"
......
XML Schema import 元素
定义和用法
import 元素用于向一个文档添加带有不同目标命名空间的多个 schema。
元素信息
出现次数
无限制
父元素
schema
内容
annotation
语法
<import
id=ID
namespace=anyURI
schemaLocation=anyURI
any attributes
>
(annotation?)
< ......
XML Schema union 元素
定义和用法
union 元素定义多个 simpleType 定义的集合。
元素信息
出现次数
一次
父元素
simpleType
内容
annotation、simpleType
语法
<union
id=ID
memberTypes="list of QNames"
any attributes
>
(annotation?,(simpleType ......
编译:C程序直接编译成标准的二进制可执行的代码,但C#的源程序并不是被编译成二进制可执行的形式,而是一种中间语言(MSIL),类似JAVA中的字节码
结构体:C#的结构体与C++的结构体相似。但是C#的结构体与类是不同的,而且不支持继承。
预编译:C#中存在预编译的指令支持条件编译,警告,错误报告和编译行控制。其指令 ......