static void dfxml_create(dfxml_writer &xreport,const std::string &command_line,const BulkExtractor_Phase1::Config &cfg) { xreport.push("dfxml","xmloutputversion='1.0'"); xreport.push("metadata", "\n xmlns='http://afflib.org/bulk_extractor/' " "\n xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " "\n xmlns:dc='http://purl.org/dc/elements/1.1/'" ); xreport.xmlout("dc:type","Feature Extraction","",false); xreport.pop(); xreport.add_DFXML_creator(PACKAGE_NAME,PACKAGE_VERSION,svn_revision_clean(),command_line); xreport.push("configuration"); xreport.xmlout("threads",cfg.num_threads); xreport.xmlout("pagesize",cfg.opt_pagesize); xreport.xmlout("marginsize",cfg.opt_marginsize); xreport.push("scanners"); /* Generate a list of the scanners in use */ std::vector<std::string> ev; be13::plugin::get_enabled_scanners(ev); for(std::vector<std::string>::const_iterator it=ev.begin();it!=ev.end();it++){ xreport.xmlout("scanner",(*it)); } xreport.pop(); // scanners xreport.pop(); // configuration }
/** * Open a DFXML file and import its hash elements. */ hashdb_exporter_t (const std::string& _dfxml_outfilename) : dfxml_outfilename(_dfxml_outfilename), x(_dfxml_outfilename, false) { // start with dfxml tag x.push("dfxml"); // add creator information x.add_DFXML_creator(PACKAGE_NAME, PACKAGE_VERSION, "svn not tracked", command_line); }