while(iter.MoveNext())
{
LoadBook(iter.Current);
}
}
private void LoadBook(XPathNavigator lstNav)
{
//We are passed an XPathNavigator of a particular book node
//we will select all of the descendents and
//load the list box with the names and values
XPathNodeIterator iterBook=lstNav.SelectDescendants
(XPathNodeType.Element, false);
while(iterBook.MoveNext())
listBox1.Items.Add(iterBook.Current.Name + ": "
文章來源于領測軟件測試網 http://www.kjueaiud.com/