- Timestamp:
- Sep 6, 2011, 11:00:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/ippToPsps/perl/convertPhotCodesToXml.pl
r28889 r32337 4 4 use strict; 5 5 use IPC::Cmd 0.36 qw( can_run run ); 6 use XML::Writer;7 6 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 8 7 use Pod::Usage qw( pod2usage ); … … 27 26 28 27 29 30 my $output = new IO::File(">$outputPath"); 31 my $writer = new XML::Writer(OUTPUT => $output, DATA_MODE => 1, DATA_INDENT=>2); 32 $writer->xmlDecl('UTF-8'); 33 34 $writer->startTag('table', "name" => "PhotoCal"); 28 open (DATOUT, ">".$outputPath); 35 29 36 30 open (PHOTCODES, $inputPath); … … 54 48 my $extinction = $columns[5]; 55 49 56 $writer->startTag('row', 57 "photoCalID" => $photCode, 58 "filterID" => $filter, 59 "photoCodeDesc" => $description, 60 "AB" => "0.0", # TODO 61 "zeropoint" => $zeroPoint, 62 "extinction" => $extinction, 63 "colorterm" => "0.0", # TODO 64 "colorExtn" => "0.0", # TODO 65 "orphanCalColor" => "0.0", # TODO 66 "orphanCalColorErr" => "0.0", # TODO 67 "startDate" => "54000."); 68 69 $writer->endTag(); 70 71 50 print DATOUT " <TR><TD>$photCode</TD><TD>$filter</TD><TD>$description</TD><TD>0.0</TD><TD>$zeroPoint</TD><TD>$extinction</TD><TD>0.0</TD><TD>0.0</TD><TD>0.0</TD><TD>0.0</TD><TD>54000.0</TD></TR>\n"; 72 51 73 52 } 74 53 } 75 54 76 $writer->endTag(); 77 78 55 close DATOUT; 79 56 close PHOTCODES; 80 57 81 # finish up XML82 #$writer->endTag();83 $writer->end();84 85
Note:
See TracChangeset
for help on using the changeset viewer.
