예제 #1
0
void XmlResultPrinter::toXml() const
{
    std::string result = "<?xml version=\"1.0\" encoding='utf-8'  standalone='yes' ?>\n";

    result += node.toXml();
    writeXmlFile(result);
}
예제 #2
0
bool ModelBackendOneFile::writeNotesToFile( const BookInfo* bookInfo, const QString& fileType, const QString& destination)
{
    qDebug() << Q_FUNC_INFO;
    if(bookInfo->getLocations().size() > 0)
    {
        if(fileType == "xml")
            writeXmlFile(bookInfo, destination);
        else
            writeHTMLFile(bookInfo, destination);

        ::sync();
    }
    return true;
}
예제 #3
0
//void XmlWriter::writeXml(QString usr, QString psswd, QString email)
void XmlWriter::writeXml()
{
    QString filename = "xmlcategoryfile.xml";
    QFile file(filename);
    if (!file.open(QFile::WriteOnly | QFile::Text)) {
        qDebug() << "_xmlWrite fail";
        return;
    }

    writeXmlFile(&file);
    //writeRegistering(&file, usr, psswd, email);
    //writeResult(&file);
    file.close();
}
예제 #4
0
bool PropertyDict::writeXmlFile( const QString &fileName,
        const QString &elementName, int release )
{
    // Atempt to open the property file
    FILE *fptr;
    if ( ! ( fptr = fopen( fileName.latin1(), "w" ) ) )
    {
        QString text("");
        translate( text, "Property:WriteXmlFile:NoOpen", fileName );
        error( text );
        return( false );
    }
    // Write the header, body, and footer.
    xmlWriteHeader( fptr, elementName, "property", release );
    writeXmlFile( fptr, release );
    xmlWriteFooter( fptr, elementName );
    fclose( fptr );
    return( true );
}