.

Friday, January 17, 2014

Assignment: One

Java application to convert .CSV data to XML format briny . burnt umber Created on September 15 , 2007 , 7 :57 PM To change this template , choose Tools guide Manager and exculpated the template in the editorpackage csvtoxmlconv authorimport coffee berry .ioimport java .utilpublic course of instruction of import Creates a new interpreter of Mainpublic Main param args the command place argumentspublic static void main (String[] args / TODO code application system of logic hereconvert (args Accept call for scuttlebutt csv and sidetrack xml Process the csv input utilise BufferedReader word form and split the line data using StringTokenizer class coiffure the output data using xml sentence structure get Write the formatted data to the output xml using BufferedWriter class param the names of the source csv and the name o f the xml outputpublic static void convert (String[]BufferedReader inBufferedWriter outString rowData ,StrDateint chromatography column ,colDateboolean HasElementsFlag tryin new BufferedReader (new Reader ([0]out new BufferedWriter (new Writer ([1]rowDataout .write while (rowData nullrowData in .readLinecolumn 0if (rowData nullHasElementsFlag falseStringTokenizer Tok new StringTokenizer (rowDatawhile (Tok .hasMoreElementsHasElementsFlag trueswitch (column fiber 0out .write out .write Tok .nextElement break grapheme 1out .write Tok .nextElement breakcase 2out .write Tok .nextElement breakcase 3out .write Tok .nextElement breakcase 4out .write StrDate Tok .nextTokenStringTokenizer pDate new StringTokenizer (StrDatecolDate 0while (pDate .hasMoreElementsswitch (colDatecase 0out .write pDate .nextElement break case 1out .write pDate .nextElement break case 2out .write pDate .nextElement breakcolDateout .write breakcase 5out .write Tok .

nextElement breakcase 6out .write Tok .nextElement breakcase 7out .write Tok .nextElement breakcase 8out .write Tok .nextElement breakcase 9out .write Tok .nextElement breakcase 10out .write Tok .nextElement breakcase 11out .write Tok .nextElement breakcolumnif (HasElementsFlagout .write out .writein .closeout .flushout .close system .out .println CSV [0] ) has been successfully converted to XML [1]catch ( NotFoundException e System .out .println CSV not foundcatch ( IOException e System .out .println ( ethe external financial support (generated with javadoc ) for the java applicationSee name - javadoc .htmlThe input .CSV dataSee name - name .csvThe output (resulting XML papers br1AA001F7p 210 72007p GAEmergencyNoYesYesYesHEp2AA002F7p 24062007p RAElectiveYesYesYesNoHPp3AA001M7p 07052006p GAElectiveYesNoNoNoHPp3AA001M7p 01042006p LAElectiveYesYesYesNoKPp4AA003F8p 31082006p GAElectiveYesYesNoNoORp5BB001M9p 2006...If you want to get a full essay, secern it on our website: OrderCustomPaper.com

If you want to get a full essay, visit our page: write my paper

No comments:

Post a Comment