Program design question

K

Kevin Passey

I have an XML file that I am using to hold some rules for downloading files
from an AS400.

I can parse these rules and read them into a vector - I now want to
reference that vector at a higher level.

Do I have to serialise it and read it back. The problem I have is that the
vector is built in an event handler which is passed to the parser as an
argument - how do I get to that vector..

Thanks

KP
 
R

Robert Klemme

Kevin said:
I have an XML file that I am using to hold some rules for downloading
files from an AS400.

I can parse these rules and read them into a vector - I now want to
reference that vector at a higher level.

Do I have to serialise it and read it back. The problem I have is
that the vector is built in an event handler which is passed to the
parser as an argument - how do I get to that vector..

Simply add a property getter for the List (Vector) to your event handler
class.

Btw, it might be more appropriate to create a custom class "Rules" that
contains the vector. That way you're more flexible and can add further
methods for Rules to this class.

Kind regards

robert
 
K

Kevin

Hi Robert thaks for your reply.

I do have a RuleSet Class with some methods in there so I can determine how
many rules I have.

What then grab the whole RuleSet through that.
thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top