I trying to to QDomDocument to read XML, but it is not reading everything.

Here is the original file:
Qt Code:
  1. <!DOCTYPE MapData>
  2. <MapData>
  3. <MapHeader HeaderId="SME" Version="0"/>
  4. <TilesetData TilesetCount="1">
  5. <Tileset0 Width="4032" Height="1248" TileHeight="96" Name="trew4w4" TileWidth="96">
  6. <ImageData I REMOVED THIS PART>
  7. </Tileset0>
  8. </TilesetData>
  9. <LayerData LayerCount="1">
  10. <0 TileCount="1" ZValue="0" Name="Layer 0">
  11. <TileData>
  12. <0 x="0" y="0" SourceId="0" TileId="1"/>
  13. </TileData>
  14. </0>
  15. </LayerData>
  16. </MapData>
To copy to clipboard, switch view to plain text mode 

I suspected that it wasn't reading everything, so I dumped what it read to another file using QTextStream.

This is what it had:
Qt Code:
  1. <!DOCTYPE MapData>
  2. <MapData>
  3. <MapHeader HeaderId="SME" Version="0"/>
  4. <TilesetData TilesetCount="1">
  5. <Tileset0 Width="4032" Height="1248" TileHeight="96" Name="trew4w4" TileWidth="96"/>
  6. </TilesetData>
  7. </MapData>
To copy to clipboard, switch view to plain text mode 

What could be causing this?