Hi all,
I got a vas t amount of information from here on my last project and cant thatnk those enough who helped. I am hoping for a little bit more.
I had some code that would write an xml file from the contents of a folder and this project is similar but the xml file is a bit different.
this is the code I am using to write the xml file currently
VB Code:
Private Sub Command2_Click() Dim f1 As Integer, songname As String, songpath As String, mp3path As String, f2 As Integer, i As Integer mp3path = "C:\PROGRAM FILES\Image text Editor\photos\" f2 = FreeFile Open mp3path & "mp3.txt" For Output As #f2 ' if you don't need mp3.txt take out f1 = FreeFile Open mp3path & "audiolist.xml" For Output As #f1 Print #f1, "<?xml version=""1.0""?>" Print #f1, "<slides>" songname = Dir(mp3path & "\*.jpg") ' get first track i = 1 While Not Len(songname) = 0 songpath = "<slidenode jpegURL=""" & mp3path & songname & """ title=""" & songname & """/> " Print #f1, songpath Print #f2, songname ' for mp3.txt Sleep 100 ' slight pause, needed songname = Dir ' get next track Wend Print #f1, "</slides>" Close End Sub
I am trying to adapt this code to write the xml file like this
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<slides>
<slideNode jpegURL="photos/marylin.jpg">dokie</slideNode>
<slideNode jpegURL="photos/ragingwater.jpg">okie</slideNode>
</slides>
hope someone can help.
thanks in advance
Rob


Reply With Quote