I have a xml log that is modified constantly by another application; however my Java code runs concurrently and checks for a couple of strings. I am using a SAX Parser. Now my question is will I have to have a new instance of a FileInputStream every time I loop through the file? How about the parser?
So let's say:
while(notfound)
{
FileInputStream fis = new FileInputStream(new File("c:/tmp/123.xml"));
SaxParser.parse(fis, sampleHandler);
notFound = sampleHandler.checkIfFound();
}
Thanks :D