I'm pretty new to XML, and I need to use some for a game I'm writing. I need to parse an XML file into game objects. For LibGdx, the XML documentation isn't great, so any tips or code examples would be awesome.
<items>
<item id="1" name="sword">
<description text="Just a regular sword."/>
<wieldable slot="HAND"/>
<weapon damage = "3"/>
</item>
</items>
What I need to do is, for each "item":
create an in-game Item object
set id and name to the proper values
Loop through the remaining elements and add each one as a component for that item with the arguments as properties.
Any suggestions?
Thanks