I am wanting to save the location of a XML file I get with a OpenDialog as a property and later retrieve that information in the method I have that decodes the XML file.
My Code: (Method that opens the XML File (“OpenFileDIalog”))
[code] Dim OpenXml As OpenDialog
Dim TheFileToOpen As FolderItem
OpenXml = New OpenDialog
#If Not (TargetLinux)
OpenXml.InitialDirectory = SpecialFolder.Documents
OpenXml.InitialDirectory = SpecialFolder.Home
OpenXml.Title = “Open a Riivolution XML File”
OpenXml.Filter = FileTypes1.RiivolutionXMLFile
TheFileToOpen = OpenXml.ShowModalWithin(MainWindow)
if TheFileToOpen <> Nil then
FileLocation = TheFileToOpen.URLPath
DecodeXmlFile //The Method
My Code: (Method that decodes the XML File (“DecodeXmlFile”))
Dim TheFile As XmlDocument
TheFile.Value = FileLocation
For “FileLocation = TheFileToOpen.URLPath” I am getting error “Expected string, got XmlDocument”.
For “TheFile.Value = FileLocation” I am getting error “Expected XmlDocument got String”.