I have the following XML I need to parse in my LibGdx game
<items>
<item id="1" name="sword">
<description text="Just a regular sword."/>
<wieldable slot="HAND"/>
<weapon damage = "3"/>
</item>
</items>
and I get an error on this code, any ideas?
XmlReader reader = new XmlReader();
Element root = reader.parse(items/Items.xml);
The error message is:
Exception in thread “LWJGL Application” com.badlogic.gdx.utils.SerializationException: Error parsing XML on line 1 near: items/Items.xml