虎克的博客

Enthusiasm Biogeography-Biodiversity Informatics-Data Sciences

SQL拆分字符串构成新的记录

| Comments

原数据表的数据格式如下

2009-05-12_011013

要求将字段vernacular中用逗号”,”分隔的字符串单独取出,并且把相应行的spnumber也取出,最后形成一条新的记录。

要求的结果如下

 

2009-05-12_011035

实现的SQL语句如下

 

—拆分字段字符串形成新的记录

CREATE   TABLE tb

    (

      spnumber INT,

      vernacular VARCHAR(1000)

    )   

    

INSERT  INTO tb

        SELECT  SPNUMBER,

                COMNAME

        FROM    dbo.CommonName       

    

    

DECLARE @i INT   

SELECT  @i = MAX(LEN(vernacular))

FROM    tb     

SET ROWCOUNT @i   

SELECT  spnumber = IDENTITY( INT)

INTO    #t

FROM    syscolumns a,

        syscolumns b   

SET ROWCOUNT 0   

SELECT  a.spnumber,

        vernacular = SUBSTRING(a.vernacular, b.spnumber,

                               CHARINDEX(‘,’, a.vernacular + ‘,’, b.spnumber)

                               – b.spnumber)

FROM    tb a,

        #t b

WHERE   SUBSTRING(‘,’ + a.vernacular, b.spnumber, 1) = ‘,’

ORDER   BY a.spnumber   

DROP TABLE   #t   

  go   

中文和数字字符串组合的拆分方法

| Comments

数据表的结构和需要的结果

2009-05-11_175429

表中的VernacularAll字段包括中文和字符组合的字符串,需要得到的结果是将两者拆分到不同的字段Vernacular和Page。

SQL语句如下

 

—将字段VernacularAll左边的中文字符串取出

 

UPDATE  dbo.FRPSNames

SET     Vernacular = LEFT(VernacularAll,

                          PATINDEX(‘%[1-9]%’, VernacularAll) – 1)

                          

—将字段VernacularAll右边的数字字符串取出

                          

UPDATE  dbo.FRPSNames

SET     Page = RIGHT(VernacularAll,

                     LEN(VernacularAll) – PATINDEX(‘%[1-9]%’, VernacularAll)

                     + 1)                 

XML学习笔记(八):XML与ADO.NET

| Comments

DataSet architecture

2009-05-10_175702

DataAdapter architecture

2009-05-10_175821

ADO.NET模式的两种数据连接模式

? Connected data access

执行步骤如下

1. Establish a connection with the database.
2. Fetch a set of records in a cursor.
3. Work with the fetched data (perform read, modify, and delete operations or even calculations).
4. Update the database, if there are any changes.
5. Close the database connection.

适合使用的情景

? You are developing applications that are online all the time. For example, in a ticket reservation
application it is necessary that you work with the latest data from the database.
In such cases, connected data access becomes necessary.
? You want to avoid the overhead of using offline data. When you use queries directly
against a database, naturally they bypass any of the intermediate layers that are involved
in disconnected data-access techniques. For example, suppose that you wish to display a
simple employee listing to the end user. This task does not involve any processing as such.
Using connected data access in such cases will of course give the best performance.
? You need a cursor model for some reason.

示例代码

   1:  protected void Button1_Click(object sender, EventArgs e)

   2:      {

   3:          SqlConnection cnn = new SqlConnection(@"data source=.;initial catalog=northwind;integrated security=true");

   4:          SqlCommand cmd = new SqlCommand();

   5:          cmd.Connection = cnn;

   6:          cmd.CommandType = CommandType.Text;

   7:          cmd.CommandText = TextBox1.Text + " FOR XML AUTO";

   8:          cnn.Open();

   9:          //Connected Data Access关键代码

  10:          XmlReader reader = cmd.ExecuteXmlReader();

  11:          StreamWriter writer = File.CreateText(@"\temp.xml");

  12:          writer.Write("<root>");

  13:          while (reader.Read())

  14:          {

  15:              writer.Write(reader.ReadOuterXml());

  16:          }

  17:          writer.Write("</root>");

  18:          writer.Close();

  19:          reader.Close();

  20:          cnn.Close();       

  21:          Process.Start(@"\temp.xml");

  22:      }

<pre class="alt"><span class="asp">&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;Default6.aspx.cs&quot; Inherits=&quot;Default6&quot; %&gt;</span></pre>

<pre>&#160;</pre>

<pre class="alt"><span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span> <span class="attr">PUBLIC</span> <span class="kwrd">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span class="kwrd">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span class="kwrd">&gt;</span></pre>

<pre><span class="kwrd">&lt;</span><span class="html">html</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;http://www.w3.org/1999/xhtml&quot;</span><span class="kwrd">&gt;</span></pre>

<pre class="alt"><span class="kwrd">&lt;</span><span class="html">head</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span><span class="kwrd">&gt;</span></pre>

<pre>    <span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span></pre>

<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span></pre>

<pre><span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span></pre>

<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">form</span> <span class="attr">id</span><span class="kwrd">=&quot;form1&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span><span class="kwrd">&gt;</span></pre>

<pre>    <span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>

<pre class="alt">        Execute Select Query:</pre>

<pre>        <span class="kwrd">&lt;</span><span class="html">asp:TextBox</span> <span class="attr">ID</span><span class="kwrd">=&quot;TextBox1&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">Height</span><span class="kwrd">=&quot;21px&quot;</span> <span class="attr">Width</span><span class="kwrd">=&quot;371px&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">asp:TextBox</span><span class="kwrd">&gt;</span></pre>

<pre class="alt">        <span class="kwrd">&lt;</span><span class="html">br</span> <span class="kwrd">/&gt;</span></pre>

<pre>        <span class="kwrd">&lt;</span><span class="html">asp:Button</span> <span class="attr">ID</span><span class="kwrd">=&quot;Button1&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">Text</span><span class="kwrd">=&quot;Execute&quot;</span> <span class="attr">OnClick</span><span class="kwrd">=&quot;Button1_Click&quot;</span> <span class="kwrd">/&gt;</span></pre>

<pre class="alt">        <span class="kwrd">&lt;</span><span class="html">br</span> <span class="kwrd">/&gt;</span></pre>

<pre>        Result XML File:<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>

<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">asp:TextBox</span> <span class="attr">ID</span><span cl<p class='post-footer'>
   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/11/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E5%85%AB%29%EF%BC%9AXML%E4%B8%8EADO.NET/'>http://Apiaceae.github.io/blog/2009/05/11/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E5%85%AB%29%EF%BC%9AXML%E4%B8%8EADO.NET/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

生物地理学新书系列

| Comments

1、Biogeography in a Changing World (Systematics Association Special Volumes)

 

2、Biogeography, Third Edition

3、Biogeography: An Ecological and Evolutionary Approach

4、Biogeography: Introduction to Space, Time, and Life

5、Evolutionary Biogeography: An Integrative Approach with Case Studies

6、Foundations of Biogeography: Classic Papers with Commentaries

7、Historical Biogeography: An Introduction

8、The Speciation and Biogeography of Birds

9、The Theory of Island Biogeography (Princeton Landmarks in Biology)

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/10/%E7%94%9F%E7%89%A9%E5%9C%B0%E7%90%86%E5%AD%A6%E6%96%B0%E4%B9%A6%E7%B3%BB%E5%88%97/'>http://Apiaceae.github.io/blog/2009/05/10/%E7%94%9F%E7%89%A9%E5%9C%B0%E7%90%86%E5%AD%A6%E6%96%B0%E4%B9%A6%E7%B3%BB%E5%88%97/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

XML学习笔记(六):如何使用XPath-基本概念

| Comments

  • Location path:路径,相当于我们使用文件系统所说的某个文件的路径。XML文档中有许多的元素和属性。按照XPath语法规则所指明的节点、元素、属性在XML文档中的位置就是Location path。
  • Axis:类似于我们文件路径所使用的磁盘符号,例如:C:\,D:\。Axis以当前节点的位置为起始点,把XML文件的其它部分进行定位,有些元素可能出于当前节点的前面或后面,这就构成了对XML文档的分隔。经常用到的Axis如下表所示。

2009-05-10_000201

  • Node tests:根据某些条件对元素或节点的类型进行检查,返回所选择的元素或节点
  • Predicates:它是一个布尔表达式,用来返回根据限定的Axis、节点或元素以及指定条件是否是真假。

例子:

following::employee[@employeeid=‘2’]

Axis::Node test[Predicates]

含义:当前节点下的employee节点employeeid属性为2

//employee[./firstname/text()=‘some_text’]

含义:根节点(//)下的当前节点employee节点的firstname节点的文本字符串是否符合’some_text’条件
//employee[@employeeid=‘1’]

含义:根节点(//)下的employee节点的employeeid属性值为1

 

XPath的内置函数

处理节点Nodes的函数

2009-05-10_000609

返回布尔值的函数

2009-05-10_000701

处理字符串Strings的函数

2009-05-10_000742

处理数字Numbers的函数

2009-05-10_000825

相关资源:

http://www.cnblogs.com/xiaofanabc/archive/2005/04/20/141132.html

http://www.cnblogs.com/xiaofanabc/archive/2005/04/20/141327.html

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E5%85%AD%29%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8XPath-%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/'>http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E5%85%AD%29%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8XPath-%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

XML学习笔记(五):读写非文本格式的XML文件

| Comments

页面代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NonTextDataXML.aspx.cs" Inherits="NonTextDataXML" %>

 

<!DOCTYPE html PUBLIC "–//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>

<html xmlns="http://www.w3.org/1999/xhtml&quot;>

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        Image file name:

        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />

        Target XML file name:

        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

        <br />

        <asp:Button ID="Button1" runat="server" Text="Save images as XML" OnClick="Button1_Click" />

        <asp:Button ID="Button2" runat="server" Text="Validation Output" OnClick="Button2_Click" />

        <br />

        <asp:ImageButton ID="ImageButton1" runat="server" Height="230px" Width="155px" />

    </div>

    </form>

</body>

</html>

执行代码:

   1:  using System;

   2:  using System.Web.UI.WebControls;

   3:  using System.Xml;

   4:  using System.IO;

   5:   

   6:   

   7:   

   8:  public partial class NonTextDataXML : System.Web.UI.Page

   9:  {

  10:      protected void Page_Load(object sender, EventArgs e)

  11:      {

  12:   

  13:      }

  14:      /// <summary>

  15:      /// Handles the Click event of the Button1 control.

  16:      /// </summary>将图片文件存储为XML文件格式(串行化)

  17:      /// The code creates an XmlTextWriter object by passing the path of the destination XML file to the constructor. 

  18:      /// Then a FileStream is created for reading data from the image file. The contents of the file are read by using the Read() method of the FileStream class, which accepts three parameters: the byte array to read the data into, the start index in the byte array from where the writing should start, and the length of data to read. 

  19:      /// The XmlTextWriter then starts writing the document. It first writes the XML processing instruction and the <imagefile> element. The <imagefile> element has two attributes: filename and s

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E4%BA%94%29%3A%E8%AF%BB%E5%86%99%E9%9D%9E%E6%96%87%E6%9C%AC%E6%A0%BC%E5%BC%8F%E7%9A%84XML%E6%96%87%E4%BB%B6/'>http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E4%BA%94%29%3A%E8%AF%BB%E5%86%99%E9%9D%9E%E6%96%87%E6%9C%AC%E6%A0%BC%E5%BC%8F%E7%9A%84XML%E6%96%87%E4%BB%B6/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

XML学习笔记(四):格式化输出XML文档

| Comments

页面代码:

   1:  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WriteXMLFormat.aspx.cs" Inherits="WriteXML" %>

   2:   

   3:  <!DOCTYPE html PUBLIC "–//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>

   4:  <html xmlns="http://www.w3.org/1999/xhtml&quot;>

   5:  <head runat="server">

   6:      <title></title>

   7:  </head>

   8:  <body>

   9:      <form id="form1" runat="server">

  10:      <div>

  11:          ConnecionString:

  12:          <asp:TextBox ID="TextBox1" runat="server" Height="70px" Width="531px"></asp:TextBox><br />

  13:          Table Name:

  14:          <asp:TextBox ID="TextBox2" runat="server" Height="48px" Width="525px"></asp:TextBox><br />

  15:          Destination File Name:

  16:          <asp:TextBox ID="TextBox3" runat="server" Height="56px" Width="519px"></asp:TextBox><br />

  17:      </div>

  18:      <asp:RadioButton ID="RadioButton1" Text="Columns as elements" runat="server" GroupName="ExportType" />

  19:      <br />

  20:      <asp:RadioButton ID="RadioButton2" Text="Columns as attributes" runat="server" GroupName="ExportType" />

  21:      <br />

  22:      <asp:CheckBox ID="CheckBox1" Text="Format XML Document" runat="server" />

  23:      <br />

  24:      Indention:

  25:      <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>

  26:      <br />

  27:      Indent Character:<br />

  28:      <br />

  29:      <asp:RadioButton ID="RadioButton3" Text="Space" GroupName="IndentCharacter" runat="server" />

  30:      <br />

  31:      <asp:RadioButton ID="RadioButton4" Text=&

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E5%9B%9B%29%3A%E6%A0%BC%E5%BC%8F%E5%8C%96%E8%BE%93%E5%87%BAXML%E6%96%87%E6%A1%A3/'>http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E5%9B%9B%29%3A%E6%A0%BC%E5%BC%8F%E5%8C%96%E8%BE%93%E5%87%BAXML%E6%96%87%E6%A1%A3/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

XML学习笔记(三):写入XML文档的XmlTextWriter

| Comments

页面代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WriteXML.aspx.cs" Inherits="WriteXML" %>

 

<!DOCTYPE html PUBLIC "–//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>

<html xmlns="http://www.w3.org/1999/xhtml&quot;>

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        ConnecionString:

        <asp:TextBox ID="TextBox1" runat="server" Height="70px" Width="531px"></asp:TextBox><br />

        Table Name:

        <asp:TextBox ID="TextBox2" runat="server" Height="48px" Width="525px"></asp:TextBox><br />

        Destination File Name:

        <asp:TextBox ID="TextBox3" runat="server" Height="56px" Width="519px"></asp:TextBox><br />

    </div>

    <asp:RadioButton ID="RadioButton1" Text="Columns as elements" runat="server" GroupName="ExportType" />

    <br />

    <asp:RadioButton ID="RadioButton2" Text="Columns as attributes" runat="server" GroupName="ExportType" />

    <br />

    <asp:Button ID="Button1" runat="server" Height="31px" Text="Export Data" Width="134px"

        OnClick="Button1_Click" />

    </form>

</body>

</html>

执行代码:

   1:  using System;

   2:  using System.Data.SqlClient;

   3:  using System.Xml;

   4:   

   5:  public partial class WriteXML : System.Web.UI.Page

   6:  {

   7:      protected void Page_Load(object sender, EventArgs e)

   8:      {

   9:   

  10:      }

  11:      protected void Button1_Click(object sender, EventArgs e)

  12:      {

  13:         

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E4%B8%89%29%EF%BC%9A%E5%86%99%E5%85%A5XML%E6%96%87%E6%A1%A3%E7%9A%84XmlTextWriter/'>http://Apiaceae.github.io/blog/2009/05/10/XML%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%28%E4%B8%89%29%EF%BC%9A%E5%86%99%E5%85%A5XML%E6%96%87%E6%A1%A3%E7%9A%84XmlTextWriter/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

XML学习笔记2读取元素属性和内容值

| Comments

示例XML文件:

<?xml version="1.0" encoding="utf-8" ?>

<!— This is list of employees —>

<employees>

<employee employeeid="1">

<firstname>Nancy</firstname>

<lastname>Davolio</lastname>

<homephone>(206) 555-9857</homephone>

<notes>

<![CDATA[includes a BA in psychology from Colorado State University in

1970. She also completed "The Art of the Cold Call." Nancy is a member of

Toastmasters International.]]>

</notes>

</employee>

<employee employeeid="2">

<firstname>Andrew</firstname>

<lastname>Fuller</lastname>

<homephone>(206) 555-9482</homephone>

<notes>

<![CDATA[Andrew received his BTS commercial in 1974 and a Ph.D. in

international marketing from the University of Dallas in 1981. He is fluent

in French and Italian and reads German. He joined the company as a sales

representative, was promoted to sales manager in January 1992 and to vice

president of sales in March 1993. Andrew is a member of the Sales

Management Roundtable, the Seattle Chamber of Commerce, and the Pacific

Rim Importers Association.]]>

</notes>

</employee>

<employee employeeid="3">

<firstname>Janet</firstname>

<lastname>Leverling</lastname>

<homephone>(206) 555-3412</homephone>

<notes>

<![CDATA[Janet has a BS degree in chemistry from Boston College (1984).

She has also completed a certificate program in food retailing management.

Janet was hired as a sales associate in 1991 and promoted to sales

representative in February 1992.]]>

</notes>

</employee>

</employees>

1、在XML文档的元素间移动(Moving Between Elements)

五个基本方法:

ReadSubTree()方法:读取当前节点的子节点并返回XMLReader实例的一个子树。当你解析一个较大的XML文件,但是只希望处理其中的少部分数据的时候,这个方法非常有效。

作用示意如下图:

2009-05-09_145042

ReadToDescendant():

2009-05-09_145343

ReadToFollowing()

ReadToNextSibling()

2009-05-09_145457XML文档的读写

| Comments

(一)XML Readers和Writers类

(二)什么时候使用XmlReader和XmlWriter类

XmlReader类

? You need to only read the document.
? The document is huge.
? You need to keep the memory footprint small.
? You want to work with many XML documents that are a reasonable size.
? You do not want to access various parts of the document randomly.
XmlWriter类
? You want to only write content.
? You want to keep the memory footprint small.
? You are writing huge XML documents and looking for better performance.

(三)Reader类

  • XmlTextReader类

使用XmlTextReader类打开XML文档:

2009-05-09_00012

   1:  using System;

   2:  using System.Xml;

   3:  using System.IO;

   4:  using System.Text;

   5:   

   6:  public partial class Default7 : System.Web.UI.Page

   7:  {

   8:      protected void Page_Load(object sender, EventArgs e)

   9:      {

  10:   

  11:      }

  12:      protected void Button1_Click(object sender, EventArgs e)

  13:      {

  14:          XmlTextReader reader;

  15:          if (RadioButton1.Checked)

  16:          {

  17:              reader = new XmlTextReader(TextBox1.Text);

  18:          }

  19:          if (RadioButton2.Checked)

  20:          {

  21:              FileStream stream = File.OpenRead(TextBox1.Text);

  22:              reader = new XmlTextReader(stream);

  23:              stream.Close();

  24:              reader.Close();

  25:          }

  26:          if (RadioButton3.Checked)

  27:          {

  28:              MemoryStream ms = new MemoryStream();            

  29:              byte[] data = ASCIIEncoding.ASCII.GetBytes(TextBox1.Text);

  30:              ms.Write(data, 0, data.Length);

  31:              reader = new XmlTextReader(ms);

  32:              //some processing code

  33:              ms.Close();

  34:              reader.Close();

  35:          }

  36:          Response.Write("XML Document Opened Successfully!");

  37:      }

  38:  }

  • XmlValidatingReader类
  • XmlNodeReader类