I guess that should be:

    if (!xml.readNextStartElement() || xml.name() != "monsters")

Since the file is also not a monster database if it doesn't have a start element to begin with.