I doubt that this is the right way to look at the issue you have. A better design or a better way to look at the problem, is to allow the user to configue the action. If the action is complex enough, XML could be a good idea.

I wouldn't be so sure myself.

What exactly is wrong with a domain specific scripting language? Will it really be easier for a non-technical user to edit XML in all cases?

Yes there are instances where static configuration using XML files makes sense. There are also many cases when it doesn't. As soon as you start getting close to a declarative or procedural language that needs to be written by normal people then I think a domain specific language is an excellent solution.

For example, look at Ant - which I find a royal PITA for non-trivial systems. I'm sure it seemed a good idea at the time to configure builds using XML, but what you end up with is verbose hard to maintain configuration files as soon as you start doing something vaguely complex. I much prefer systems like Ruby's Rake and Perl's Module::Build that allow you to use a proper scripting language.

Not many people write programs in XML. This is mostly a good thing :-)


Update: Of course on the day I write this I hear that Ant is adding scripting features - one less thing to complain about I guess ;-)


In reply to Re^2: Perl Script Engine by adrianh
in thread Perl Script Engine by davebarter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.