4.3 Windows Properties, INI
Since the Properties format is syntactically a subset of the Windows INI
format, our example will be in the Windows INI format. Let's have the
following Windows INI data:
TRSUser = John Smith
[User]
Home = D:/TRS_Client/usr/Smith
# authority(SECURITY | SOFTWARE | CLIENT | UNREGISTRED)
Authority=CLIENT
[Server]
RemoteServerURL=http://localhost:8080/TRS/TRSServer
SeverIP = 123.45.67.8
Signature = 12afe0c1d246895a990ab2dd13ce684f012b339c
The description of values of items in the data is specified as values of
data items in the Xscript language. Note that items "ReceiverSleep" and the
section "Server" are optional:
<xd:def xmlns:xd="http://www.xdef.org/xdef/4.2" name="Test" root="TRS" >
<xd:ini name="TRS">
TRSUser = string(); /* user name */
[User]
Home = file(); /* user home directory */
Authority = enum("MANAGER", "CLIENT", "UNREGISTRED"); finally outln("authority: " + getText());
ReceiverSleep = optional int(1, 3600); /* default value is 10 */
[Server] %script = optional;
RemoteServerURL = url();
SeverIP = ipAddr();
Signature = SHA1();
</xd:ini>
</xd:def>
You can try it
HERE