IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2010, 4:26:47 PM (16 years ago)
Author:
rhenders
Message:

Now storing results in XML format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/src/ippToPspsBatchDetection.c

    r28424 r28529  
    386386
    387387    // write results
    388     if (this->resultsFile) {
    389 
    390         if (fprintf(this->resultsFile, "%ld\n", minObjID) < 1 )
    391             psError(PS_ERR_IO, false, "Unable to write min Object ID to'%s'\n", this->resultsPath);
    392         if (fprintf(this->resultsFile, "%ld\n", maxObjID) < 1 )
    393             psError(PS_ERR_IO, false, "Unable to write max Object ID to'%s'\n", this->resultsPath);
    394         if (fprintf(this->resultsFile, "%ld\n", totalDetectionsOut) < 1 )
    395             psError(PS_ERR_IO, false, "Unable to write totalDetectionsOut to'%s'\n", this->resultsPath);
     388    if (this->resultsXmlDoc) {
     389
     390        xmlNodePtr rootNode = xmlDocGetRootElement(this->resultsXmlDoc);
     391        char tmp[100];
     392        sprintf(tmp, "%ld", minObjID);
     393        xmlNewChild(rootNode, NULL, BAD_CAST "minObjID", BAD_CAST tmp);
     394        sprintf(tmp, "%ld", maxObjID);
     395        xmlNewChild(rootNode, NULL, BAD_CAST "maxObjID", BAD_CAST tmp);
     396        sprintf(tmp, "%ld", totalDetectionsOut);
     397        xmlNewChild(rootNode, NULL, BAD_CAST "totalDetections", BAD_CAST tmp);
    396398    }
    397399
Note: See TracChangeset for help on using the changeset viewer.