simple OOP question
Posted on 2003-12-01
I have an OOP question. Suppose I have created a class that loads and parses an XML file. All of the xml data resides in arrays. The class method that reads the data is private. At runtime, I create an instance of my xml_parser class and populate the arrays. I have also built another class that requires the use of these arrays. How do I gain access to these variables? Do I have to make my xml_parser method public? When I create my other class instance and make a call to it....I tried passing the xml instance in to it.
xmlClass = new xml_parser()
myClass = new OtherClass(xmlClass)
how is this suppose to work?