I want to be able multiple 'jobs' or entries.
Expand|Select|Wrap|Line Numbers
- <Job> <JobName>e</JobName> <Source>C:\Users\Public\Pictures\Sample Pictures\Desert.jpg</Source> <Destination>C:\Users\Public\Pictures\Sample Pictures\a.zip</Destination> <Timestamp>11/21/2012 12:12:04 PM</Timestamp> </Job>
Below is the code where I write the XML code. I am thinking my issue is here and could be solved with a "for each" loop..but i'm clueless.
Expand|Select|Wrap|Line Numbers
- Dim filesEnum2 As IEnumerator
- filesEnum2 = OpenFileDialog1.FileNames.GetEnumerator()
- With xmlwrt
- .WriteStartDocument()
- .WriteComment("XML Backup.")
- .WriteStartElement("Job")
- Dim jName As String = JobName.Text.ToString
- .WriteElementString("JobName", jName.ToString)
- While filesEnum2.MoveNext
- .WriteStartElement("Source")
- .WriteString(filesEnum2.Current)
- .WriteEndElement()
- End While