Index: trunk/ippToPsps/src/ippToPspsBatchDetection.c
===================================================================
--- trunk/ippToPsps/src/ippToPspsBatchDetection.c	(revision 28424)
+++ trunk/ippToPsps/src/ippToPspsBatchDetection.c	(revision 28529)
@@ -386,12 +386,14 @@
 
     // write results
-    if (this->resultsFile) {
-
-        if (fprintf(this->resultsFile, "%ld\n", minObjID) < 1 ) 
-            psError(PS_ERR_IO, false, "Unable to write min Object ID to'%s'\n", this->resultsPath);
-        if (fprintf(this->resultsFile, "%ld\n", maxObjID) < 1 ) 
-            psError(PS_ERR_IO, false, "Unable to write max Object ID to'%s'\n", this->resultsPath);
-        if (fprintf(this->resultsFile, "%ld\n", totalDetectionsOut) < 1 ) 
-            psError(PS_ERR_IO, false, "Unable to write totalDetectionsOut to'%s'\n", this->resultsPath);
+    if (this->resultsXmlDoc) {
+
+        xmlNodePtr rootNode = xmlDocGetRootElement(this->resultsXmlDoc);
+        char tmp[100];
+        sprintf(tmp, "%ld", minObjID);
+        xmlNewChild(rootNode, NULL, BAD_CAST "minObjID", BAD_CAST tmp);
+        sprintf(tmp, "%ld", maxObjID);
+        xmlNewChild(rootNode, NULL, BAD_CAST "maxObjID", BAD_CAST tmp);
+        sprintf(tmp, "%ld", totalDetectionsOut);
+        xmlNewChild(rootNode, NULL, BAD_CAST "totalDetections", BAD_CAST tmp);
     }
 
