>Can somebody, please, explain me the way of workin this method!
>
[quoted text clipped - 17 lines]
>
>So what is the point?? I can't catch it!
selectSingleNode searches for the first node that matches the XPath
you pass it. It returns a reference to the node or null if there is
no node matches the XPath.
selectSingleNode method
http://msdn.microsoft.com/library/en-us/xmlsdk/html/xmmthselectSingleNode.asp
XPath
http://msdn.microsoft.com/library/en-us/xmlsdk/html/conXPath.asp
>And now my problem:
>I have Repeating Table, and want to extract the same values from text-field,
>for example, "task" (it repeats several times)
>So how should I achieve it? To get array, or something, with the values from
>this field!
It would look something like this in JScript. Other languages would
look much the same.
var tasks = new Array();
// Get all the task nodes
var nodes = XDocument.DOM.selectNodes("//my:task");
if (nodes != null)
{
var node = null;
var value;
// Don't really need to reset but might as well ensure we're
// at the beginning
nodes.reset();
// Get the first node
node = nodes.nextNode();
// Loop until there are no more nodes
while (node != null)
{
value = node.text;
/* do something, i.e. add to an array */
tasks.push(value);
// Move to next node
node = nodes.nextNode();
}
}
Regards,
Steve
--
Please post questions to the newsgroup; everyone benefits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
Juli V. - 01 Sep 2004 07:04 GMT
Great thanx, Steve!
Your code works great! (minimum modification needed)
I understood this method at last!
>>Can somebody, please, explain me the way of workin this method!
>>
[quoted text clipped - 75 lines]
> rights.
> Sample code subject to http://www.microsoft.com/info/cpyright.htm