I am building a world editor for a game and I need help with the process of loading a map file. Everything is complete except for the map loading. I know how to load xml in c++ using tinyxml but my c# is really rusty. I just need to know how to take data from each of the elements so I can use them in the world editor. Any help would be massively appreciated.
this is an example of the file I am trying to load into my editor.
I know the layout of the xml is pretty poorly designed but I cannot modify it because I can not change the game client's LoadMap function.
<?xml version="1.0" encoding="UTF-8"?>
-<Map> -<tileset progPath="../../../../../../../../Desktop/TestTileset.png"
path="Desktop/TestTileset.png" tileSetSizeY="20" tileSetSizeX="20" tileHeigh="32" tileWidth="32" GridSizeH="5" GridSizeW="5">
tilesetinfo
<tileset index="0" y="0" x="0">tile</tileset>
<tileset index="0" y="1" x="0">tile</tileset>
<tileset index="0" y="2" x="0">tile</tileset>
<tileset index="0" y="0" x="1">tile</tileset>
<tileset index="0" y="1" x="1">tile</tileset>
<tileset index="0" y="2" x="1">tile</tileset>
</tileset>
<item y="36" x="40" lane="2">waypoint</item>
<item y="116" x="23" lane="2">waypoint</item>
<item y="116" x="23" lane="2">node</item>
<item y="120" x="72" lane="2">waypoint</item>
<item y="120" x="72" lane="2">node</item>
<item y="114" x="120" lane="2">waypoint</item>
<item y="114" x="120" lane="2">node</item>
<item y="70" x="138" lane="2">waypoint</item>
<item y="116" x="23" lane="2" owner="1">tower</item>
<item y="114" x="120" lane="2" owner="2">tower</item>
<item y="30" x="117" owner="1">avatar</item>
<item y="126" x="125" owner="2">avatar</item>
</Map>