import settings from a xml?

cybris

Active Member
I'm trying to import some settings from an xml into an index. I'm using a while loop to fill the index. What I want it to do is once it reaches the last setting in a particular set in the xml file to exit the loop and quit filling the index. I wans't sure how to do this and was wondering if anyone here had any ideas?
 

mycroft

Script Author: MyPrices
I'm trying to import some settings from an xml into an index. I'm using a while loop to fill the index. What I want it to do is once it reaches the last setting in a particular set in the xml file to exit the loop and quit filling the index. I wans't sure how to do this and was wondering if anyone here had any ideas?

There is a value that actually tells you how many items are in an XML file if it's created correctly...

Maybe you can post the code and the list so we can see how you are trying to do it as it stands now?
 

cybris

Active Member
Sorry it tookj so long to respond my box has been down for a week waiting on parts.

anyway here is a sample from the xml file.
Code:
<InnerSpaceSettings>
	<Set Name="Buffs">
		<Setting Name="1">Stalker's Grace II</Setting>
		<Setting Name="2">Speed of Wind I</Setting>
		<Setting Name="3">Barbshroud I"</Setting>
	</set>
Whaty i'm trying to do would be akin to an array in c++ where the array is called Buffs and each setting would be an element of the array for instance Buffs[1] in my script would refer to Stalker's Grace.

The issue i'm running in to is that the number of elements could 3 or it could be 10 because I'm going to make a UI that will write to the xml file to save settings a user inputs so if they wanted to add to the list they can. So I need the script to be able to check how many elements there will be in order to index it and i wasn't sure how to do it.
Hope that helps a bit.
 
Top Bottom