After running your code under my debugger... it appears that you're iterating through the children too many times. Meaning, you recursively traverse through the entire tree (repeatedly) at <dict>, the inner <dict>, <dict_FOCUS> and also <dict_FOCUS2>.
For me, it was easier just to iterate (without recursion) through the nodes using QDomNode::firstChildElement(QString); I can't guarantee that this is bullet proof.. but it's a start! ;)
// Root element
QDomElement docElem = doc.documentElement();
// <plist> -> <dict>
QDomNode n = docElem.firstChildElement().firstChildElement("dict");
qDebug() << "Album list";
qDebug() << "------------------------------------";
QDomNodeList list = n.childNodes();
int count = list.count();
for(int i = 0; i < count; ++i)
{
QDomElement node = list.at(i).toElement();
if(node.tagName().startsWith("dict_FOCUS"))
{
node = node.firstChildElement();
while(!node.isNull())
{
if(node.text() == "Album" && node.tagName() == "key")
{
node = node.nextSiblingElement();
if(!node.isNull() && node.tagName() == "string")
{
qDebug() << "[-] Album found -> " << qPrintable(node.text());
}
}
node = node.nextSiblingElement();
}
}
}