Loading XML files into listbox

poe

Member
Joined
Oct 8, 2006
Messages
12
Programming Experience
Beginner
Deleting XML node if file doesn't exist

Oops. The thread name is wrong. I need help with deleting XML nodes if a specific text file is missing.

Hello. I'm making a program with song lyrics that you select in a play list and then the lyrics show up in a text box.
I store the information about all the songs in a single XML file.

VB.NET:
<SongInfo>
  <Song>
    <Name>I Was Only Kidding</Name>
    <Artist>Weird Al Yankovic</Artist>
    <Album>Off The Deep End</Album>
    <Lyrics>I Was Only Kidding.txt</Lyrics>
  </Song>
  <Song>
    <Name>Everything You Know Is Wrong</Name>
    <Artist>Weird Al Yankovic</Artist>
    <Album>Bad Hair Day</Album>
    <Lyrics>Everything You Know Is Wrong.txt</Lyrics>
  </Song>
</SongInfo>

As you can see I have info about name, artist, album and path to the lyrics.

What I need help with is that on start up I want the program to check if each of the lyrics files exist. If they don't exist, then I want the program to remove the whole Song node with the information about the song.

Please help!

// poe (I use VB2005)
 
Last edited:
Thanks for your reply, but I already made it in another way. ;)


So I guess a mod could lock this topic or something since I don't need help anymore.
 
The common practice if you solve the problem yourself is to post the answer. That way the community can benefit from you experience.
 
Yes but I did it in a completly different way. I changed from listbox to datagrid and went from a single xml file to many. So since the topic name is different I thought it just would get confusing.
 
Back
Top