I would like to load an XML from a file, modify it, then save the XML to itself. However, I am getting an error when I try to write to the same file. I can create a new file, but that is not my goal. Since there is no close/dispose option for XmlDocument, I don't know how to force it. I did try GC.Collect() even though it is not recommend, but it didn't help either-way.
Dim ShipXMLDocument As XmlDocument = New XmlDocument() ShipXMLDocument.Load(FilePath) 'Modify XML.... ShipXMLDocument.Save(FilePath)
I am new at coding so please explain the solution like I am a 7 year old.
Thank you!
Thank you!