1
私は今何時間も考えているという問題があります。たぶん私はちょうどどのような...間違った方法を考える:「常にXmlDocument」すべてのノードを選択Innertext任意の深さ
Dim doc As XmlDocument = New XmlDocument()
doc.Load(New StreamReader(File.Open(strFilePathAndName, FileMode.Open), Encoding.GetEncoding("iso-8859-15")))
Dim root As XmlElement = doc.DocumentElement
ように私は私が(再帰的なファイル検索)の検索複数のXML文書を持って
と負荷それから私は、これで検索する必要がすべての子ノートのドキュメントではなく、それは「親」 だ説明するのは少し難しい...まあ例のように:
<?xml version="1.0"?>
<rootnode>
<node1>Users</node1> '<- Get "Users" from that
<node2>xxxxxx</node2> '<- Get "xxxxxxx" from that
<node3> '<- Don't get that
<node4> '<- Don't get that
<nodeX>xxxxxx</nodeX> '<- Get xxxxx that
<node5> '<- Don't get that
<bla>335</bla> '<- Get 335 fromthat
<bla2>3353</bla2> '<- Get 3353 from that
</node5>
<node4>
</rootnode>
オリジナルは少し大きい...
私はNodeListの中でそれらを保存しようとした。その後、
nodeList = root.SelectNodes("descendant::*")
とで区切られた文字列に見つかったすべての項目を保存します「;」 :
For Each node As XmlNode In nodeList
ergstring = ergstring & """" & node.InnerText & """" & ";"
Next
ありがとうございます! 時には答えがとてもシンプルです^^ – Michael