Code:
/*
* XMLValidator.java
*
* Created on April 21, 2005, 7:42 PM
*
*/
package xmlvalidator;
import java.io.File;
/**
*
* @author Surya
*/
public class XMLValidator
{
private File xml;
private File xsd;
/**
* Creates a new instance of XMLValidator
*/
public XMLValidator(File xml, File xsd)
{
this.xml = xml;
this.xsd = xsd;
java.awt.EventQueue.invokeLater(new Runnable()
{
public void run()
{
new ValidateGUI(this).setVisible(true);
}
});
}
// Returns the xml file
public File getXmlFile()
{
return xml;
}
//Returns the xsd file
public File getXsdFile()
{
return xsd;
}
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
if (args.length != 2)
System.out.println("Usage 'java XMLValidate filename.xml filename.xsd");
else
{
File file1 = new File(args[0]);
File file2 = new File(args[1]);
if (file1.exists() && file2.exists())
XMLValidator xmlv = new XMLValidator(file1, file2);
else
System.out.println("One or more of the filenames mentioned does not exist.");
}
}
}
Using Netbeans 4.1 RC to code. Error is at the line:
Code:
XMLValidator xmlv = new XMLValidator(file1, file2);
I dont understand the error. The error states that line 63 not a statement. Another error is line 63 ';' expected. This lead me to believe that there was a syntactical error somewhere but I have gone over my code so many times. I dont get it. Please let me know if you need additional info on the code. Hope you guys can help. Driving me crazy for a while thanks in advance.[/code]