当前位置: 首页>>代码示例>>C++>>正文


C++ XmlWriter::setAutoNewLine方法代码示例

本文整理汇总了C++中XmlWriter::setAutoNewLine方法的典型用法代码示例。如果您正苦于以下问题:C++ XmlWriter::setAutoNewLine方法的具体用法?C++ XmlWriter::setAutoNewLine怎么用?C++ XmlWriter::setAutoNewLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XmlWriter的用法示例。


在下文中一共展示了XmlWriter::setAutoNewLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: xw

xmlwriterblock::xmlwriterblock(QFile* file , Patient* blockpatient)
{

    XmlWriter xw (file);
    xw.setAutoNewLine( true );

    const QString index = blockpatient->index;
    const QString prenom = blockpatient->prenom;
    const QString nomjeunefille = blockpatient->nomdejeunefille;
    const QString nom = blockpatient->nom;
    const QString datedenaissance = blockpatient->datedenaissance;
    const QString datededeces= blockpatient->datededeces;

    const QString adresse = blockpatient->adresse;
    const QString ville = blockpatient->ville;
    const QString region = blockpatient->region;
    const QString codepostal = blockpatient->codepostal;
    const QString pays = blockpatient->pays;

    const QString telephone1 = blockpatient->telephone1;
    const QString telephone2 = blockpatient->telephone2;
    const QString telephone3 = blockpatient->telephone3;
    const QString courriel = blockpatient->courriel;
    const QString telecopie = blockpatient->telecopie;

    const QString textelibre = blockpatient->textelibre;
    const QString marque = blockpatient->marque;
    const QString codeinternat = blockpatient->codeinternat;
    const QString datededebut = blockpatient->datededebut;
    const QString datedefin = blockpatient->datedefin;
    const QString formatage = blockpatient->formatage;
    const QString indexdeconfiance = blockpatient->indexdeconfiance;


    xw.newLine();
    xw.writeRaw("<!-- Patient block -->");
    xw.newLine();
    AttrMap attrPatient;
    attrPatient.insert( "emrUid", index);
    attrPatient.insert( "firstname" , prenom);
    attrPatient.insert( "birthname" , nom);
    attrPatient.insert( "secondname", nomjeunefille);
    attrPatient.insert( "dob", datedenaissance);
    attrPatient.insert( "dod", datededeces);
    xw.writeOpenTag("Patient", attrPatient);
    xw.writeRaw("<!-- Contact -->");
    xw.newLine();
    AttrMap attrAdress;
    attrAdress.insert( "ad", adresse);
    attrAdress.insert( "city", ville);
    attrAdress.insert( "county", region);
    attrAdress.insert( "zip" , codepostal);
    attrAdress.insert( "state" , pays);
    xw.writeOpenTag( "Address", attrAdress);
    AttrMap attrContact;
    attrContact.insert( "tel1", telephone1);
    attrContact.insert( "tel2", telephone2);
    attrContact.insert( "tel3" , telephone3);
    attrContact.insert( "fax" , telecopie);
    attrContact.insert("mail" , courriel);
    xw.writeOpenTag( "Contact", attrContact);
    xw.writeRaw( "<!-- PMHx -->");
    xw.newLine();
    xw.writeOpenTag("PMHx");
    xw.writeOpenTag("PMH_Item");
    xw.writeRaw("<!-- use FreeText or Encoded not both -->");
    xw.newLine();
    xw.writeTaggedString( "FreeText", textelibre, AttrMap() );
    AttrMap attrEncoded;
    attrEncoded.insert("label", marque);
    attrEncoded.insert( "icd10" , codeinternat);
    xw.writeOpenTag( "Encoded" , attrEncoded);
    xw.writeTaggedString( "DateStart", datededebut, AttrMap("format", formatage) );
    xw.writeTaggedString( "DateEnd", datedefin, AttrMap("format", formatage) );
    xw.writeTaggedString( "ConfidenceIndex", indexdeconfiance, AttrMap() );
    xw.writeCloseTag("PMH_Item");
    xw.writeCloseTag("PMHx");
    xw.writeRaw("<!-- Populate Form items -->");
    xw.newLine();
    xw.writeCloseTag("Patient");
    xw.newLine();

}
开发者ID:Dinesh-Ramakrishnan,项目名称:freemedforms,代码行数:83,代码来源:xmlwriterblock.cpp


注:本文中的XmlWriter::setAutoNewLine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。