XmlElement.GetAttribute不工作

XmlElement.GetAttribute不工作,xml,vb.net,xml-parsing,Xml,Vb.net,Xml Parsing,我有一个具有以下结构的XML: <table> <header> <c0 type="string">name</c0> <c1 type="ip_address">last_ip_address</c1> </header> <body> <r> <c0>CHDB2

我有一个具有以下结构的XML:

    <table>
      <header>
        <c0 type="string">name</c0>
        <c1 type="ip_address">last_ip_address</c1>
      </header>
      <body>
        <r>
          <c0>CHDB207</c0>
          <c1>172.18.151.57</c1>
       </r>
      </body>
   </table>
但是,我只得到一个空白值。。。在调试模式下查看该属性时,是否未显示任何信息


有人知道吗?使用VB.NET

您的
标题
元素已声明,但从未分配给
c0
和/或
c1
元素

Dim headerList作为XmlNodeList=document.SelectNodes(“表/标题/*”)
作为headerList中的XmlNode的每个标头
MsgBox(header.Attributes(“type”).Value)
下一个

document.SelectNodes(“table/header/*”)是否返回任何节点?这就成功了!非常感谢-现在正在工作。我知道这只是少了一件小事,但我不是一个专业的程序员;)