This content has been marked as final. Show 2 replies
I would have prob done it all in Unix, but date calculations in Unix is not the best!Under Unix you might mean native scripting tools inlcuding the classical sh, ksh, csh, zsh, bash command shells and the awk, sed, grep stuff up to newer tools like perl and the like.
Java is a fully-fledged programming languge which is very much suited to XML extracting and date manipulation.
At the end you might be able to solve the problem in both ways, and the choice could be dictated by design considerations.
I do mean those Unix tools yes, if I was to start using java, I have never done XML parsing etc, I was not even thinking of doing a full XML parse but rather just treating it as a text file and extracting the 'expiry' part, is there any help that I could use a resource for an example of XML parsing? Does it take much to set this up?
For reference this is my code so far...
* Created on 11 September 2007, 10:58
public class Main
static String licenseDirectory = new String();
static String licenseFile = new String();
Date today = new Date();
Date expiryDate = new Date();
/** Creates a new instance of Main */
System.out.println("License Directory is: " + licenseDirectory );
System.out.println("License File is: " + licenseFile );
private static void WriteToLogFile( String stringToWrite )
//Open the output stream
public static void main(String args)
//Get the input parameters
licenseDirectory = args;
licenseFile = args;
Main main = new Main();
Message was edited by: