QDomElement MusicAbstractXml::writeDomElementMutilText(QDomElement &element, const QString &node,
                                                       const QStringList &keys, const QList<QVariant> &values,
                                                       const QString &text)
{
    Q_ASSERT(!keys.isEmpty());
    Q_ASSERT(!values.isEmpty());

    QDomElement domElement = writeDomElementMutil(element, node, keys, values);
    QDomText domText = m_ddom->createTextNode( text );
    domElement.appendChild( domText );
    return domElement;
}
void DownloadBreakPointConfigManager::writeBreakPointConfig(const DownloadBreakPointItems &records)
{
    ///////////////////////////////////////////////////////
    createProcessingInstruction();
    QDomElement player = createRoot(APPNAME);
    QDomElement download = writeDom(player, "breakPoint");

    if(!records.isEmpty())
    {
        writeDomText(download, "url", records.first().m_url);
    }

    foreach(const DownloadBreakPointItem &record, records)
    {
        writeDomElementMutil(download, "value", DownloadXmlAttributes() <<
                                                DownloadXmlAttribute("start", record.m_start) <<
                                                DownloadXmlAttribute("end", record.m_end) <<
                                                DownloadXmlAttribute("ready", record.m_ready) );
    }