I don’t know how to explain this problem in XML terms, but…I have this XML:
<Entities>
<Tree1 id="0" x="192" y="352" />
<Tree2 id="1" x="320" y="288" />
<Tree3 id="2" x="704" y="336" />
<Tree4 id="3" x="32" y="400" />
<Tree5 id="4" x="432" y="400" />
<Grass1 id="5" x="384" y="448" />
<Grass1 id="6" x="672" y="384" />
<Grass1 id="7" x="240" y="400" />
<Grass2 id="8" x="512" y="448" />
<Flower1 id="9" x="128" y="448" />
<Flower1 id="10" x="592" y="384" />
<Flower2 id="11" x="80" y="448" />
<Flower2 id="12" x="272" y="400" />
<Flower2 id="13" x="416" y="448" />
<Mushrooms1 id="14" x="544" y="192" />
<Mushrooms1 id="15" x="352" y="192" />
<Mushrooms1 id="16" x="224" y="96" />
<Mushrooms2 id="17" x="32" y="80" />
<Mushrooms2 id="18" x="256" y="80" />
<Mushrooms2 id="19" x="416" y="176" />
<Mushrooms2 id="20" x="768" y="240" />
<Rock1 id="21" x="80" y="64" />
<Rock2 id="22" x="464" y="144" />
<Spiral id="23" x="160" y="80" />
<Spiral id="24" x="576" y="176" />
<Player id="25" x="16" y="448" />
</Entities>
as you can see, there are a lot of entities. these entities are mostly all scenery, so I want to have a class that represents all of them. My problem is, usually the way tutorials teach Ogmo is that to get a list of elements you would have to do mapXML.Entities.Player, or some other specific name as the last dot. My question is, how do I just cycle through all of the nodes under Entities, and handle them appropriately that way?
Thanks, Taylor
PS. this is possibly a stupid question. I don’t know much about XML other than Ogmo stuff, mostly.