Problem with QDomDocument
I trying to to QDomDocument to read XML, but it is not reading everything.
Here is the original file:
Code:
<!DOCTYPE MapData>
<MapData>
<MapHeader HeaderId="SME" Version="0"/>
<TilesetData TilesetCount="1">
<Tileset0 Width="4032" Height="1248" TileHeight="96" Name="trew4w4" TileWidth="96">
<ImageData I REMOVED THIS PART>
</Tileset0>
</TilesetData>
<LayerData LayerCount="1">
<0 TileCount="1" ZValue="0" Name="Layer 0">
<TileData>
<0 x="0" y="0" SourceId="0" TileId="1"/>
</TileData>
</0>
</LayerData>
</MapData>
I suspected that it wasn't reading everything, so I dumped what it read to another file using QTextStream.
This is what it had:
Code:
<!DOCTYPE MapData>
<MapData>
<MapHeader HeaderId="SME" Version="0"/>
<TilesetData TilesetCount="1">
<Tileset0 Width="4032" Height="1248" TileHeight="96" Name="trew4w4" TileWidth="96"/>
</TilesetData>
</MapData>
What could be causing this?
Re: Problem with QDomDocument
Quote:
What could be causing this?
I think it's caused by your code.
Re: Problem with QDomDocument
Your XML is not well-formed, which is probably why QDomDocument is struggling to read it.