#include <iostream>
#include <qdom.h>
#include <qfile.h>

int main()
{
QFile f("quotes.xml");
f.open(IO_ReadOnly);
QDomDocument d;
d.setContent( &f );
QDomNode n = d.firstChild();
while (!n.isNull()) {
   if(n.isElement() ) {
      QDomElement e = n.toElement();
      cout << "The name of the element is " << e.tagName() << endl;
      return 1;
   }
   n = n.nextSibling();
}
f.close();

cout << "no element in the Document" << endl;
return 0;
}
