void translateInt10ToHex(QString& str)
{
    static const QRegExp rX("(\\&\\#[0-9]{2,3})");
    int pos = 0;
    while ((pos = rX.indexIn(str, pos)) > -1)
    {
        QString xB = rX.cap(1);
        str.replace(pos++, xB.size(), QLatin1String("&#x") + QByteArray(1, xB.right(xB.size() - 2).toUShort()).toHex().toUpper());
    }
}