Settings.xml Format

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » Settings.xml format
Settings.xml format
Offline
Posts: 21
By Dunbar 2021-11-30 09:33:18
Link | Quote | Reply
 
Hi,

I am trying to understand the settings.xml a little bit and using config.load for a file like:
Code
<?xml version="1.1" ?>
<settings>
    <global>
        <param>true</param>
        <anotherparam>false</anotherparam>
        <items>
	        <item>Some Item</item>
		<item>Another Item</item>
        </items>
    </global>
</settings>


When loaded into the addon, the items table only has one value. I assume this is because it is using the xml element name "item" as the key, so duplicates are being overwritten. Is this the case, and is there anyway to using non-unique element names? Wouldn't be a big deal to use <item1>...<itemN> tags, but was curious. Thanks!
 Fenrir.Niflheim
VIP
Offline
Server: Fenrir
Game: FFXI
user: Tesahade
Posts: 443
By Fenrir.Niflheim 2021-11-30 09:52:54
Link | Quote | Reply
 
Yes, the tag name is used as the key for the table. Depending on what you are doing with the data there are ways to avoid explicitly giving each subtag in items a unique name.

This question would be better asked on our discord, in the development channel. https://discord.com/channels/338590234235371531/633140308850376714
Offline
Posts: 21
By Dunbar 2021-11-30 10:10:49
Link | Quote | Reply
 
Thanks. That channel appears greyed out to me in discord. Does it need an invite? thebeerbaron2218#8074 is my discord username.
 Fenrir.Niflheim
VIP
Offline
Server: Fenrir
Game: FFXI
user: Tesahade
Posts: 443
By Fenrir.Niflheim 2021-11-30 10:26:34
Link | Quote | Reply
 
Dunbar said: »
Thanks. That channel appears greyed out to me in discord. Does it need an invite? thebeerbaron2218#8074 is my discord username.

Just follow the instruction in the welcome channel, and add your self to the v4 dev role. the channel will be available once you have that role.
Log in to post.