Hi,

In my Qt mobile application I am trying to read the xml file with QDomDocument, but QDom is not bale to read the content from the file even the file was existed and has some data.

Qt Code:
  1. file = new QFile("file.xml");
  2. if(!file->open(QIODevice::ReadWrite | QIODevice::Text))
  3. {
  4. exit(1);
  5. }
  6. if(!doc.setContent(file))
  7. {
  8. exit(1);
  9. } else
  10. {
  11. ......
  12. }
To copy to clipboard, switch view to plain text mode 

After the if(!doc.setContent(file)) statement the program simply exited with status code 1. I would be grateful for any help.

Thank you,
Baluk