The shell main program functions are very similar to those of the XML to CSV converter.
Arguments: Input Directory Name Output Flat File Name File Description Document Name Options: Validate input Help Validate and process command line arguments IF help option specified Display help message Exit ENDIF Open output file Create new FlatTargetConverter object, passing: Output Stream File Description Document Name Set up implementation dependent DOM environment for loading, parsing, and validating input documents Open input directory Get first file from input directory DO for all files in input directory Input Document <- Load input file, validating it if requested Call FlatTargetConverter processDocument method, passing the Input Document Increment number of documents processed ENDDO Close output file Display completion message with number of documents processed |