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.
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)
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: