日期:2014-05-20 浏览次数:21154 次
<IDEHeader>
<SendOrgan ref="0000000000">中国</SendOrgan>
<BatchTotal>1</BatchTotal>
<SendTime>2012-07-07 22:23:34</SendTime>
<SourceType ref="3"/>
<Meta>
<Key>ResponseCode</Key>
<Value>00000000</Value>
</Meta>
<Meta>
<Key>ResponseDesc</Key>
<Value>处理成功!</Value>
</Meta>
</IDEHeader>
XmlNode xn=xmlDoc.SelectSingleNode("bookstore");
XmlNodeList xnl=xn.ChildNodes;
foreach(XmlNode xnf in xnl)
{
XmlElement xe=(XmlElement)xnf;
Console.WriteLine(xe.GetAttribute("genre"));//显示属性值
Console.WriteLine(xe.GetAttribute("ISBN"));
XmlNodeList xnf1=xe.ChildNodes;
foreach(XmlNode xn2 in xnf1)
{
Console.WriteLine(xn2.InnerText);//显示子节点点文本
}
}