然后再传递过来?是不是说读出来啊,如果是的话: //use a filestream to get the data
FileStream fs = new FileStream("..\\..\\..\\books.xml",FileMode.Open);
XmlTextReader tr = new XmlTextReader(fs);
while(!tr.EOF) {
//if we hit an element type, try and load it in the listbox
if(tr.MoveToContent()==XmlNodeType.Element && tr.Name=="title") {
listBox1.Items.Add(tr.ReadElementString());
}
else
//otherwise move on
tr.Read();
}
FileStream fs = new FileStream("..\\..\\..\\books.xml",FileMode.Open);
XmlTextReader tr = new XmlTextReader(fs);
while(!tr.EOF) {
//if we hit an element type, try and load it in the listbox
if(tr.MoveToContent()==XmlNodeType.Element && tr.Name=="title") {
listBox1.Items.Add(tr.ReadElementString());
}
else
//otherwise move on
tr.Read();
}
http://www.microsoft.com/china/community/article.asp?oBODY=TechZone/TechArticle/TechDoc/dconfig&oXSLT=TechZone/TechArticle/TechContent#1