QVector<Bit> AVRStudioXMLParser::GetBits(QDomNode node)
{
    QVector<Bit> bits(0);

    while(!node.isNull())
    {
        QDomNamedNodeMap attributes = node.attributes();
        Bit bit;

        for(int i = 0; i < attributes.size(); i++)
        {
            QDomNode attribute = attributes.item(i);
            if(bit.GetMappingMap()[attribute.nodeName()])
                *bit.GetMappingMap()[attribute.nodeName()] = attribute.nodeValue();
        }

        bit.SetValues(GetValues(node.childNodes()));
        bits.append(bit);

        node = node.nextSibling();
    }

    return bits;
}