Serializing heterogeneous lists to/from XML?

  • Thread starter Thread starter martin.zarate
  • Start date Start date
M

martin.zarate

I'm working on a simple command-line app. The app takes an XML file
that provides the operations to perform. However, the problem I'm
running in to is that the file must contain a seperate array for each
class of operations it supports, even though all operations implement
the same execution interface (IModule implements Execute and
PostProcess), but have wildly different configuration members.

Because each module is very different to configure, but the same at
execution, the usual approach of copying the members from a stubbed-out
base class is inappropriate. Is there any way to unify their
serialized lists into a single list? Or do the XML lists have to be
homogeneous?

And as an aside, is there a text-based serialization system that is
less verbose than XML? Like a YAML serializer or something?

Thanks in advance,

-- Martin
 

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

Back
Top