Hi all,
I have received loads of valuable advice from people here whilst doing a small project that updated an xml mp3 playlist. I am now attempting to do the same concept with a picture viewer. I have tried to adapt the code used for my mp3 updater but I am stuck with how to display the xml file properley. I have this code so far
VB Code:
Private Sub Command1_Click() Dim f1 As Integer, info As String, imagename As String, songpath As String, mp3path As String, description As String, imagepath As String, f2 As Integer, i As Integer mp3path = "C:\WED\" f2 = FreeFile Open mp3path & "mp3.txt" For Output As #f2 f1 = FreeFile intro = TextBox1.Text imagename = TextBox2.Text f3 = FreeFile Open mp3path & "audiolist.xml" For Output As #f1 Print #f1, "<?xml version=""1.0""?>" Print #f1, "<imagedata>" Print #f1, "<image imagename=""" & imagename & info; """ />" songname = Dir(mp3path & "\*.jpg") ' get first image i = 1 While Not Len(songname) = 0 info = "<info=""" & mp3path & songname & """ title=""" & songname & """/> " intro = "<intro=""" & intro & """/>" imagename = "<images=""" & imagename & """ & intro=""" & """/>" Print #f1, info Print #f1, intro Sleep 100 songname = Dir Wend Close End Sub
But I need to get the xml file like this as I can only seem to get it on different lines
<imagedata>
<image imagename="My home" info="images/mtns_shot.jpg">
<intro>This is the great smoky mountains</intro>
</image>
</imagedata>
Thanks
Rob




Reply With Quote