The point of XML is not that it is a language in the way natural or
programming languages are.
The point is it provides a standard machine AND human readable way of
representing structured data. Yes, it's not terribly fun or
straightforward to edit XML in a text editor. That's why XML aware
editors exist. If a suitable DTD or schema exists, the XML editor can
keep you away from stupid syntax or misspellings that take time and
energy to track down while you're executing your thing.
Because XML is a widespread standard, there are lots of XML parsers and
generators out there. The "problem" with Maven isn't that it uses XML,
it's that there isn't (as far as I know) aren't amazing tools to help
you write the XML. The Maven plugin for Eclipse provides some support,
but frequently defaults to "use the XML tab." The XML editor may not
ensure you have the correct tags but at least it helps you get the
structure (spelling and closing) correct.
Another helpful tool is "tidy" -- frequently when I'm done editing an
XML -- such as a copy/paste from an online example -- I can use tidy to
detect gross errors reformat it nicely.
The human readable part is important because with a binary file, when
things go wrong can be hard to tell whether the file or tool you're
using is incorrect. At least with XML you can go read it yourself, even
if <noun>tags</noun> <verb>do</verb> <verb>make</verb>
<pronoun>it</pronoun> <adjective>awkward</adjective><punctuation
type="emphasis">!</punctuation>.
In any event, Maven does many things for free that I couldn't do nearly
as quickly without it.
On 10/24/10 12:44 PM, Kenneth McDonald wrote:
On Oct 23, 2010, at 7:10 PM, Néstor Boscán wrote:
XML is one of the most widespread and flexible languages out there, accept
it, move on.
XML is not a language, it is merely a way of specifying structured data. To
the extent that your structured data does or does not have control structures,
internal data structures, standard procedural/functional manipulations, etc.,
_then_ you have or have not a language. My contention (one of them) has always
been that XML's syntax is poorly suited for human understanding of complex
structures. And in defense, I still maintain that if XML were so great at this
stuff, people would be writing new languages in XML, forcing programmers to
program in XML...which hasn't happened. There's one language I'm aware of which
uses XML for its syntax (can't remember the name), and it seems to have sunk
from sight.
A _huge_ amount of work goes into grammars and parsers when languages are being defined.
This is no accident. A good grammar (language design) can make all the difference between
a language that will be widely used, and one that will hardly be used. I just don't
understand why people think that "languages" based on XML are somehow above the
fray.
Cheers,
Ken
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org