PDA

View Full Version : QDomDocument and Namespace support?



patrik08
18th May 2006, 08:28
Hi all ...

Why QDomDocument not read Namespace ?
f( root.tagName() != "cms:wget" ) stop here...

<<<<<
QDomDocument doc("http://www.pulitzer.ch/2005/PuliCMS/1.0");
if (!doc.setContent(&xmlfile,true, &errorStr, &errorLine, &errorColumn)) {
QMessageBox::warning( this, tr( "Database Error! & XML Error!" ),
tr("Parse error at line %1, column %2:\n%3" )
.arg(errorLine)
.arg(errorColumn)
.arg(errorStr) );
xmlfile.close();
return 0;
}

<<<<< no error ....




<?xml version="1.0" encoding="UTF-8"?>
<cms:wget xmlns:cms="http://www.pulitzer.ch/2005/PuliCMS/1.0">
<requestfile sqlurl="http://ppk.ciz.ch/format/sql/php5_export.sql" localname="citta.sql" />
<requestfile sqlurl="http://ppk.ciz.ch/format/sql/qt_export.sql" localname="qtcitta.sql" />
<requestfile sqlurl="http://ppk.ciz.ch/format/sql/citta_svizzere.sql" localname="sxcitta.sql" />
</cms:wget>

full code http://ciz.ch/svnciz/forms_shop/forms_shop/db_setup.cpp
function int DB_Setup::Download_File( int next )

wysota
18th May 2006, 10:50
Maybe because you didn't declare the namespace?

http://doc.trolltech.com/4.1/qtxml.html#an-introduction-to-namespaces