问题:reader.Value怎么是空 
这是我的代码 private void button5_Click(object sender, EventArgs e) 

XmlTextReader reader = new XmlTextReader("c:\\books2.xml"); 
StringBuilder sb = new StringBuilder(); 
while (reader.Read()) 

if (reader.NodeType == XmlNodeType.XmlDeclaration) 

sb.AppendLine("<?"+reader.Value+"?>"); 

else if (reader.NodeType == XmlNodeType.Element) 

sb.Append("<" + reader.Name); 
TripAttr(reader, sb); 
sb.Append(">"); 
sb.Append(reader.Value== "" || reader.Value == null ? "":reader.Value); 

else if (reader.NodeType == XmlNodeType.EndElement) 

sb.AppendLine("</" + reader.Name + ">"); 


MessageBox.Show(sb.ToString()); 

private void TripAttr(XmlTextReader reader,StringBuilder sb) 

while (reader.MoveToNextAttribute()) 

sb.Append(" " + reader.Name + "='" + reader.Value + "'"); 

reader.MoveToElement(); 
} 这是我的xml文件 
<?xml version="1.0" encoding="UTF-8"?> <Books> 
<Book> 
<ISBN>23423423</ISBN> 
<Title>windows xp</Title> 
<Price>200.00</Price> 
<Author> 
<name>zhangming</name> 
<age>44</age> 
</Author> 
</Book> 
<Book> 
<ISBN>453543</ISBN> 
<Title>voice of music</Title> 
<Price>29.00</Price> 
<Author> 
<name>walt</name> 
<age>32</age> 
</Author> 
</Book> 
</Books>