c# - 如何在 C# 中从 XML 文件创建 DOM 树?

标签 c# .net wpf xml dom

有人可以指导我如何在 C#/WPF 中从 XML 文件创建 DOM 树吗?如果有人对此有任何经验,也许您使用过哪些类?任何帮助将不胜感激。

最佳答案

您可以使用 XmlDocument 类将 XML 文件加载到 DOM 中。

MSDN - This class implements the W3C Document Object Model (DOM) Level 1 Core and the Core DOM Level 2. The DOM is an in-memory (cache) tree representation of an XML document and enables the navigation and editing of this document. Because XmlDocument implements the IXPathNavigable interface it can also be used as the source document for the XslTransform class.

更多信息

关于c# - 如何在 C# 中从 XML 文件创建 DOM 树?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8978295/

相关文章:

c# - 你如何在winforms中使用通用对象绑定(bind)?

c# - NHibernate 查询只运行一次,然后抛出 InvalidCastException

c# - 类(class)边界

c# - 判断鼠标是否在表单上的最佳方法是什么?

wpf - 具有 TemplateSelector 属性的控件

javascript - 将值 "9:00 AM"转换为类型“System.TimeSpan”时出错

c# - 如何获取 Windows Mobile 上点击并按住的延迟值?

c# - 以编程方式关闭 Windows 语音识别的自动化功能?

c# - RelayCommand canexecute 永远不会被重新评估

c# - 有没有办法在不使用后台线程的情况下更新进度条?