如何获取XmlNode ... [英] How to get XmlNode...

查看:99
本文介绍了如何获取XmlNode ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个xml,其中包含组织的雇用信息.

使用XPathQuery ..我已从xml检索到Empnodes.
现在导航每个节点,我为Empnodes创建了XPathNavigator.从XPathNavigator,我创建了XPathNodeIterator.

现在,我想从XPathNodeIterator创建一个XMLNode对象.

如何获取它?

I have a xml which contain employ information of an organization.

Using XPathQuery .. i have retrieved Empnodes form the xml.
Now to navigate each node, i have created XPathNavigator for the Empnodes .From XPathNavigator , i have created XPathNodeIterator.

Now i want to create an XMLNode object form the XPathNodeIterator.

How to get it??

推荐答案

请参见以下链接

使用XPathNavigator/XPathDocument


尝试使用google ..:)
see following link

Using XPathNavigator/XPathDocument


try to use google.. :)


一个简单的foreach循环怎么样?
How about a simple foreach loop?
XmlNode parentNode = myXMLDoc.SelectSingleNode("\\root\EmployeeNode");

foreach (XmlNode xn in parentNode.Nodes)
{
     //Do something cool with the child node here.
}



霍根



Hogan


这篇关于如何获取XmlNode ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆