ExtractXMLMap
Posted: Fri May 01, 2015 7:13 pm
Hallo,
i try to write and to read a MAP using the xml-features.
It is not possible to get the map back. Can somebody tell me, what is going wrong?
Thanks
Thomas
i try to write and to read a MAP using the xml-features.
Code: Select all
Procedure SaveSettings()
Define FileName.s
If MapSize(SettingsData()) > 0
If CreateXML(0) And InsertXMLMap(CreateXMLNode(RootXMLNode(0), "settings"), SettingsData())
FileName = SettingsFileName()
SaveXML(0, FileName)
FreeXML(0)
Else
Debug XMLError(0)
EndIf
EndIf
EndProcedure
Procedure LoadSettings()
Define FileName.s
FileName = SettingsFileName()
If FileSize(FileName) >= 0
If LoadXML(0, FileName) And XMLStatus(0) = #PB_XML_Success
ExtractXMLMap(MainXMLNode(0), SettingsData())
FreeXML(0)
Else
Debug XMLError(0)
EndIf
EndIf
EndProcedure
Thanks
Thomas