Passing variable from contentHandler
I have a little problem with Jaxp (xerces). I don't know though if it is a java or jaxp related problem. Anyway, I have implemented the contentHandler to handle callback methods. My problem is that I cannot find a way to pass a variable to the class that instantiates the parser (this class is named ParseXML). In particular, I have collected some data from the xml I am parsing, and stored them to an arraylist. How can I pass the arraylist to the ParseXML class instance or in the main class? If I declare a get method inside the contentHandler and declare in ParseXML, data = contentHandler.getData(); it says that the method is undefined. Is there any other way I can do this?
As you may have quessed I'm pretty new in Java, so any help would be greatly appreciated.