I'm filling a ComboBox
from a Xml
:
Dim mXml As New XmlDocument
Dim Arquivo As New IO.FileInfo(My.Application.Info.DirectoryPath & "\Configuracao.xml")
mXml.Load(Arquivo.FullName)
Dim SearchMusic As New DataSet
SearchMusic.ReadXml(Arquivo.ToString)
Me.ComboBox_list.DisplayMember = "Nome"
Me.ComboBox_list.DataSource = SearchMusic.Tables(0)
SearchMusic = Nothing
My XML
is as follows:
<Musicas>
<Musica>
<Nome>teste1</Nome>
<Path>D:\teste</Path>
</Musica>
<Musica>
<Nome>Teste2</Nome>
<Path>c:\</Path>
</Musica>
<Musica>
<Nome>Tesssste</Nome>
<Path>c:\Windows\</Path>
</Musica>
</Musicas>
I need to know how to fetch the contents of tag
Path
according to the name, eg:
- I write
teste1
it needs to returnD:\teste
, can it do that?