Dear List, I am new to this list and XML in general.
I'd like to use XML to feed parameters in our modular C++ application. Modular in the sense that, depending on the configuration (determined at program startup), different types of objects are created through a factory. Example: Class A { Helper* h; } Class ColoredHelper : public Helper {..} Class StripedHelper : public Helper {..} On construction an instances of A the factory creates the helper according to the configuration file and lets h point to it. The problems we are facing are: a) The configuration file must be made consistent. I am thinking of a XML schema, which describes all possible classes that can be used as Helper's. With the help of this xsd the configuration can be validated, or maybe can be transformed into a GUI. Before starting the application the configuration file can easily be checked against the schema. b) Parametrization of the Helpers. The different helpers might need different parameters (ColorHelper maybe only one, whereas StripedHelper needs two parameters). I am thinking of XML fragments, which are parsed by the helper object to extract the appropriate parameters. At the moment I am considering the Xerces parser in SAX mode. Is this the right decision, or should I rather go for DOM? Can XML fragments be passed to another object for parsing (upon detection of the helpers token)? Or should I add new callback functions according to the object generated? Is the approach feasible, or am I missing something fundamentally? Thank your for your help! Yours, Michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]