else
{
//otherwise move on
tr
}
}
}
private void LoadList(XmlReader reader)
{
try
{
listBox
}
// if an XmlException is raised
catch(XmlException er){}
}
運行這段代碼
在運行示例代碼時
例如
下面的示例迭代XmlReaderSample
protected void button
{
//set this path to match your data path structure
string fileName =
//Create the new TextReader Object
XmlTextReader tr = new XmlTextReader(fileName);
//Read in node at a time
while(tr
{
//check to see if it
if(tr
{
//if it
for(int i =
listBox
}
}
}
這次查找元素節點
[
From:http://tw.wingwit.com/Article/program/net/201311/15181.html