What do you mean, "added by itself"? If you are writing the file, then it is your code that is putting in the "-" characters. If it is not your code, then the code you are using is writing invalid XML to the file.Not working xml: //The Dash and xml header are added by itself.
You will not be able to bind incorrect XML to the XML model. Fix the code that writes the file so it writes complete and correct XML and you will be able to load it into the model.
Be aware that unless you add more code (a QFileSystemWatcher) to monitor any changes to the file, the model will not automatically reload itself if the file is changed from another program.
Bookmarks