Hi,

This is my first experience with both DOM and xml. My aim is to use QDom to parse xhtml data.
I do not understand why the QDomNodeList contains 0 elements (according to gdb).

Qt Code:
  1. <html>
  2. <body>
  3. <p>
  4. <report id="1">dd:</report>
  5. </p>
  6. <p>
  7. <report id="2">MM:</report>
  8. </p>
  9. <p>
  10. <report id="3">yyyy:</report>
  11. </p>
  12. </body>
  13. </html>
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. QFile file("template.xhtml");
  2. if (!file.open(QIODevice::ReadOnly))
  3. return;
  4. if (!doc.setContent(&file)) {
  5. file.close();
  6. return;
  7. }
  8. file.close();
  9.  
  10. QDomNodeList nodeList = doc.elementsByTagName("report");
To copy to clipboard, switch view to plain text mode 

How can I populate such list ?
any clue ?

thanks in advance