I've looked at a few examples, but all of them seem to use simpler XML files than the one I'm trying to read.
Here's an example of the layout I'm trying to read:
<map>
<map_values></map_values>
<grid>
<grid_values></grid_values>
<square>
<values></values>
</square>
<square>
<values></values>
</square>
<square>
<values></values>
</square>
</grid>
<grid>
<grid_values></grid_values>
<square>
<values></values>
</square>
<square>
<values></values>
</square>
<square>
<values></values>
</square>
</grid>
</map>
Currently I'm using DOM to try and read this in, but I'm not sure how to read in one grid's section of squares at a time. Right now I'm using the following:
NodeList squares = doc.getElementsByTagName("square");
but it's returning all the squares in both grids.
I'm OK switching out of DOM, I just need a suggestion for what to switch to and where to find a good tutorial.