PDA

View Full Version : Read XML error



sophister
13th May 2009, 17:10
Hi, I have save some date in an XML file using DOM. But when I try to read from the file, the QDomDocument::setContent(QFile) always return false. The following is what my xml file contains:

<?xml version="1.0" encoding="UTF-8"?>
<easygo>
<1>H:/qtapplication/easygo/debug/easygo.exe</1>
<1>H:/qtapplication/easygo/debug/easygo.o</1>
<1>H:/qtapplication/easygo/debug/main.o</1>
<2>D:/Program Files/Vim/vim72/gvim.exe</2>
<2>H:/qtapplication/easygo/debug/moc_easygo.cpp</2>
<2>H:/qtapplication/easygo/debug/moc_easygo.o</2>
</easygo>

Any idea appreciated!

Lykurg
13th May 2009, 17:42
Tag names cannot start with a number or punctuation character! That's no valid XML:)