由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - 一个xml的问题。
相关主题
心得:use XPath (+namespace)Anybody use HtmlAgilityPack?
using weather XML feed in C# - 2请教一个HTMLelement问题
c#里面那个treenode的创建问题问个问题
问个c# treeview的问题HttpWebRequest小程序
Re: 女码工求给些意见或内推。 (转载) 关于SqlDataAdapter的初级问题求助
visual studio为什么不加eclipse修改建议的功能DALFactory in PetShop 3
xmldocument and webservice questionlistbox 的问题
BUG! Re: xmldocument and webserviceDoes .NET have built-in Cryptography?
相关话题的讨论汇总
话题: xml话题: node话题: use话题: easily
进入DotNet版参与讨论
1 (共1页)
k***e
发帖数: 7933
1
看xml版很萧条,就放在这里了,hoho。
in xml file, how to easily access a particular node?
in other words, is there to uniquely identify a node(in c#)?
I remember there is a position() function in xsl, don't
know if it works this way.
for example, we can easily access an object in an array
by the index. is there any similar thing in xml? (maybe
just use SelectNodes to select nodes and use index? )
p***n
发帖数: 635
2
there are more than 1 way to do it in C# but one of them is
XPathNavigator.Select Method (XPathExpression)
using namespace System::Xml;
using namespace System::Xml::XPath;
if you know the node's exact XPath,

【在 k***e 的大作中提到】
: 看xml版很萧条,就放在这里了,hoho。
: in xml file, how to easily access a particular node?
: in other words, is there to uniquely identify a node(in c#)?
: I remember there is a position() function in xsl, don't
: know if it works this way.
: for example, we can easily access an object in an array
: by the index. is there any similar thing in xml? (maybe
: just use SelectNodes to select nodes and use index? )

s*i
发帖数: 5025
3
check out XmlDocument

【在 k***e 的大作中提到】
: 看xml版很萧条,就放在这里了,hoho。
: in xml file, how to easily access a particular node?
: in other words, is there to uniquely identify a node(in c#)?
: I remember there is a position() function in xsl, don't
: know if it works this way.
: for example, we can easily access an object in an array
: by the index. is there any similar thing in xml? (maybe
: just use SelectNodes to select nodes and use index? )

a**y
发帖数: 335
4
Use an unique ID as an attribute,
use SelectNodes("//NodeName[@ID='blah']");
This way, it will recursively search for all the nodes under current node.

【在 k***e 的大作中提到】
: 看xml版很萧条,就放在这里了,hoho。
: in xml file, how to easily access a particular node?
: in other words, is there to uniquely identify a node(in c#)?
: I remember there is a position() function in xsl, don't
: know if it works this way.
: for example, we can easily access an object in an array
: by the index. is there any similar thing in xml? (maybe
: just use SelectNodes to select nodes and use index? )

1 (共1页)
进入DotNet版参与讨论
相关主题
Does .NET have built-in Cryptography?Re: 女码工求给些意见或内推。 (转载)
website projectvisual studio为什么不加eclipse修改建议的功能
how to get reference.vb file?xmldocument and webservice question
webservice 只能定义一个函数吗?BUG! Re: xmldocument and webservice
心得:use XPath (+namespace)Anybody use HtmlAgilityPack?
using weather XML feed in C# - 2请教一个HTMLelement问题
c#里面那个treenode的创建问题问个问题
问个c# treeview的问题HttpWebRequest小程序
相关话题的讨论汇总
话题: xml话题: node话题: use话题: easily