1 package org.ashkelon.util; 2 3 import java.io.BufferedReader ; 4 import java.io.FileReader ; 5 import java.io.IOException ; 6 7 14 public class ApiXml 15 { 16 public static void main(String args[]) throws IOException 17 { 18 if (args.length == 0 || args[0] == null) 19 { 20 System.out.println("Usage: java org.ashkelon.util.ApiXml <plist_filename>"); 21 return; 22 } 23 System.out.println("<?xml version=\"1.0\" ?>"); 24 System.out.println("<api>"); 25 System.out.println("<name></name>"); 26 System.out.println("<summarydescription></summarydescription>"); 27 System.out.println("<description></description>"); 28 System.out.println("<publisher></publisher>"); 29 System.out.println("<download_url></download_url>"); 30 System.out.println("<release_date>2001-07-03T08:00:00.000</release_date>"); 31 System.out.println("<version></version>"); 32 33 BufferedReader br = new BufferedReader (new FileReader (args[0])); 34 String line = null; 35 while ( (line=br.readLine()) != null ) 36 { 37 System.out.println("<package>"+line+"</package>"); 38 } 39 br.close(); 40 System.out.println("</api>"); 41 } 42 } 43 44 | Popular Tags |