文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 在.NET中操作XmlDocument
侵权投诉

在.NET中操作XmlDocument

在.NET中操作XmlDocument

在.NET中操作XmlDocument

[日期:01-17] [字体:大 中 小]

大家想必一定都了解XML,利用XML技术来存储数据和文档是一件很容易的事情,.NET Framework 在它的命名空间System.Xml 就提供了一种可以很方便的操作xml的类XmlDocument,它使用起来非常容易,XmlDocument 其实就是一个简单的树。下面详细的介绍XmlDocument 的使用方法。

下面是这个类中操作节点的常用方法。

// create a new node in the document object from the source node

//and name it as "sName"

// the return value indicates success or failure

public bool AddNode(XmlNode oSource, String sName);

// same as above except that it also specifies the parent node of the

// newly created node

// the return value indicates success or failure (returns false if the

// parent node does not exist)

public bool AddNode(XmlNode oSource, String sName, String sParent);

// create a set of new nodes in the document object from the source node

// list and name them as "sName"

// the return value indicates success or failure

public bool AddNodes(XmlNodeList oSourceList, String sName);

// same as above except that it also specifies the parent node of the

// newly created nodes the return value indicates success or failure

// (returns false if the parent node

// does not exist)

public bool AddNodes(XmlNodeList oSourceList, String sName, String sParent);

第1页

你可能喜欢

热门文档

相关文档

  • C#.NET 使用XmlDocument操作XML

    XmlElement theBook = null, theElem = null, root = null; XmlDocument xmldoc = new XmlDocument(); try { xmldoc.Load("Books.xml"); root = xmldoc...

  • 使用XMLDocument操作xml文件

    使用XMLDocument操作xml文件_IT/计算机_专业资料。使用XMLDocument操作xml文件在C#.net 中如何操作 XML 需要添加的命名空间: using System.Xml; 几个公共对象: Xml...

  • C#[1].net中如何操作XML(有实例和详解)

    在C#.net 中如何操作 XML 需要添加的命名空间: using System.Xml; 定义几个公共对象: XmlDocument xmldoc ; XmlNode xmlnode ; XmlElement xmlelem ; 1,创建到...

  • 在C#.net中如何操作XML

    在C#.net中如何操作XML_IT/计算机_专业资料。在C#.net中如何操作XML 需要添加的命名空间: using System.Xml; 定义几个公共对象: XmlDocument xmldoc ; XmlNode...

  • C#操作XML的完整例子——XmlDocument篇

    C#操作XML的完整例子——XmlDocument篇_IT/计算机_专业资料。C#操作XML的完整例子——XmlDocument篇C#操作 的完整例子————XmlDocument C#操作 XML 的完整例子——...

  • 实验5 .NET中XML操作

    实验5 .NET中XML操作_理学_高等教育_教育专区。实验5 .NET中XML操作 1.使用XmlDocument,以树状后根遍历,以Treeview显示,输出每个节点的值、名称和类型。 2....

  • C#操作xml文件读写

    .xml")); 二、具体实例 在C#.net中如何操作XML 需要添加的命名空间: using System.Xml; 定义几个公共对象: XmlDocument xmldoc ; XmlNode xmlnode ; Xml...

  • C#操作XML小结

    C#操作XML小结_IT/计算机_专业资料。C#-XMLC#操作 C#操作 XML 小结 1、简单介绍 using System.Xml; //初始化一个 xml 实例 XmlDocument xml=new XmlDocument...

  • C#操作XML

    11 作者:李志伟 时间:2014-02-17 1..NET 对读写 XML 文件的支持 (1)... XmlDocument XmlComment XmlDocumentType XmlDeclaration XmlNode XmlNodeList Xml...

  • 20081226在[1].NET中处理XML

    与 ADO.NET 集成. 山东师范大学研究生 《XML技术》课程 .NET框架中的XML 类 ...可通过数据集的关系表示形式或XmlDataDocument的树表示形式同 时查看和操作结构化...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email