Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to load new (unknown) items from a XML file.

$
0
0
I wonder if anyone can give me any idea how to load new (unknown) items I have inside a XML doc.
Our designer want the functionallity to be able to "mod" our game by just adding new items inside the XML doc instead of having a fix amout of stuff.

At the moment it looks like this

Before new stuff is added
&lt!--- some other stuff -->
<goods type="goods" name="food" tooltip="Used for traveling and in the home city" picture="food.jpg" value="5"/>
&lt!--- some more other stuff -->


After
&lt!--- some other stuff -->
<goods type="goods" name="food" tooltip="Used for traveling and in the home city" picture="food.jpg" value="5"/>
<goods type="goods" name="coal" tooltip="do something" picture="coal.jpg" value="25"/>
&lt!--- some more other stuff -->

The designer want to be able to go into the xml document and add a new goods without being forced to edit the code as well. But I have no clue how to do this or even how to think about it to solve it.

Anyone here that has an idea how this can be achived?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>