First, I've got a simple xml file that I'm using to keep track of whether or not my login app has completed it's in the following format:
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<!-- Generated by LavishSettings v2 -->
<InnerSpaceSettings>
<Set Name="Account1">
<Setting Name="LoginStatus">LoggedIn</Setting>
</Set>
</InnerSpaceSettings>
Code: Select all
function main()
{
;DECLARE/SET VARIABLES
declare LoginFilePath filepath local "Account1LoginStatus.xml"
LavishSettings:Import[${LoginFilePath}]
declare LoginStatus string local
LoginStatus:Set[${LavishSettings[Account1].FindSetting[LoginStatus].String}]
Echo "---"
Echo "The Login Status is ${LoginStatus}!!!"
Echo "---"
;WRITE TO THE LOGIN FILE
LavishSettings[Account1].FindSetting[LoginStatus]:Set["LoggedOut"]
LavishSettings[Account1]:Export[${LoginFilePath}]
LavishSettings:Import[${LoginFilePath}]
LoginStatus:Set[${LavishSettings[Account1].FindSetting[LoginStatus].String}]
Echo "The Login Status is ${LoginStatus}!!!"
Echo "---"
}
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<!-- Generated by LavishSettings v2 -->
<InnerSpaceSettings>
<Setting Name="LoginStatus">LoggedIn</Setting>
</InnerSpaceSettings>
Thanks!
-J