101 VB.NET Samples --XML文件的处理
2005-10-18 13:08
225 查看
在.Net Frame里的如何处理XML文件的呢.
这要用到System.Xml名字空间.具体的说明要见MSDN.
用到的类有XmlDocumnet,XmlElement,XmlComment,XmlText ,XmlAttribute类
下面是MS例子里的说明:
Simple.xml
New.xml
Bad.xml
If any one of the three does not exist, the main UI will be disabled. The files are located in the /bin folder of the project folder. If the files exist, you will be able to chose a set of commands loaded in to a checked listbox control. Simply highlight an item on the list and then change its check box to selected and the command will be executed. Note some of the commands require saving changes out to disk. Make sure you have read/write permissions to the /bin directory.
这要用到System.Xml名字空间.具体的说明要见MSDN.
用到的类有XmlDocumnet,XmlElement,XmlComment,XmlText ,XmlAttribute类
下面是MS例子里的说明:
.NET Framework: Using the XMLDocument Class
This sample shows how to take advantage of the XMLDocument class built-in to System.Xml.dll. This class exposes the XML Document Object Model, or DOM, which can be used to manipulate XML data.Featured Highlights
In previous versions of Visual Basic, XML processing support for the DOM was provided by the MSXML COM library. The .NET Framework provides a vast array of functionality that equals and oftentimes exceeds those functions found in earlier versions of MSXML. This sample takes a task-based approach to showing how to use the DOM. A checked listbox control lists a set of 'How do I' options. Selecting one will perform the task. You might wish to add breakpoints to examine the code and comments as it runs.Requirements
Requires the Trial or Release version of Visual Studio .NET Professional (or greater).Running the Sample
When the sample loads, it checks for the existence of three files:Simple.xml
New.xml
Bad.xml
If any one of the three does not exist, the main UI will be disabled. The files are located in the /bin folder of the project folder. If the files exist, you will be able to chose a set of commands loaded in to a checked listbox control. Simply highlight an item on the list and then change its check box to selected and the command will be executed. Note some of the commands require saving changes out to disk. Make sure you have read/write permissions to the /bin directory.
相关文章推荐
- 复杂的XML文件(用VB.net处理)
- 101 VB.NET Samples - How-To Configuration Settings
- 101 VB.NET Samples: Getting System & Environment Information
- 101 VB.NET Samples - How-To Service Manager
- Qt处理xml文件
- DOTNET零碎要点---vb.net获取combox的选中值,删除Datagridview,选中值,处理提示框...
- 在处理xml文件时遇到了锁定问题
- 注意maven打包mybatis的xml文件name处理
- VB.NET之旅(十四)—动态关联事件与处理程序
- VB 时间处理 日期处理函数
- mybatis在xml文件中处理大于号小于号的方法
- [原创]VB程序 - 处理字符和文件名称的代码模块
- asp.net处理XML文件的两种方法
- 用Qt中的QDomDocument类处理XML文件
- VB保存工程后弹出的add this project to sourcesafe问题处理
- C#生成、解析xml文件以及处理报错原因
- jbpm3.1.4设计器(eclipse3.1.4)中gpd.xml文件乱码的处理
- VB的容错处理(完整)
- vb.net 教程 5-14 图像处理之内存处理基础3
- vb标准(四):错误处理