在以下示例中,将使用 // Create XPathNavigator and specify XPath for nodes.
XPathNavigator repeatingTableRow1 = MainDataSource.CreateNavigator().SelectSingleNode(
"/my:myFields/my:group1/my:group2[1]", NamespaceManager);
// Select nodes in specified XPathNavigator.
CurrentView.SelectNodes(repeatingTableRow1,repeatingTableRow1,"CTRL5");
// Get context nodes in selection.
XPathNodeIterator contextNodes = CurrentView.GetContextNodes(repeatingTableRow1,"CTRL5");
// Loop through collection and display information.
foreach (XPathNavigator contextNode in contextNodes)
{
MessageBox.Show(contextNode.Name);
MessageBox.Show(contextNode.InnerXml);
MessageBox.Show(contextNode.Value);
}
很简单就获取到重复表的Value..
希望对各位有帮助。。。
本文代码 。。来之MSDN。。 。