[.NET] 讀取xml string的問題
請輸入專案類型(網站專案或者應用程式專案):應用程式專案
最近開始使用vb.net
在讀取xml時, 是直接將一段 xml like String 讀入
以 XmlReader進行讀取的行為
但我要如何才能知道在某個元素底下到底有幾個attribute呢?
ex:
<USERS><USER account="test1"/><USER account="test2"/></USERS>
有沒有類似以下這樣的作法的東西
Dim rdr As System.Xml.XmlReader
// rdr 將上述字串讀入..code 省略
then !
rdr.getAttributes() // return Enum型態的資訊
然後在自己依序取出 attribute
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.250.111.46