xmlDoc.save won't save

sputnik

Member
Joined
Oct 11, 2005
Messages
10
Programming Experience
5-10
I have this savefiledialog - - in it, I build the xml file, and then add a save, but it's not saving the changes. There is a file, and it correctly asks me if I want to save over it, but it still doesn't.

Code:
Dim sfd As New SaveFileDialog
sfd.Title = "Save " & frmSMC.OpenFilename.Caption
sfd.FileName = frmSMC.OpenFilename.Caption
sfd.Filter = "xmlFiles (*.xml) |*.sitemap"
If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim xml As String = (build my xml here)
Dim xmlDoc As New XmlDocument()
xmlDoc.LoadXml(xml)
' here, I check xmlDoc, and it has all the changes - then:
xmlDoc.Save(FileName)
' changes aren't saved
End If

Any ideas on why?
 
Back
Top