trying to parse a file with SAX
Hi All,
I have some code which takes a XML DTD and parses it, writing information to System.out. Or it's meant to - I cannot get the parser to see the DTD file.
The code is:
public static void main (String[] args)
{
try
{
Class loadedClass = Class.forName("com.ibm.xml.parser.SAXDriver");
Parser xParser = (Parser)loadedClass.newInstance();
CatalogueReader cr = new CatalogueReader();
xParser.setDocumentHandler(cr);
xParser.setErrorHandler(cr);
xParser.parse("catalogue1.txt");
}
catch(Exception e)
{System.out.println("Problem: " +e.getMessage());}
}
which produces the following message:
Problem: catalogue1.txt (The system cannot find the file specified)
I have added the text file to the project and tried putting it in various folders without success.
I've been stuuck on this for a day now and would appreciate a nudge in the right direction.
Many thanks.

