358
what’s the goal
Chapter 6
XML is a specication that the World Wide Web
Consortium (W3C) works and agrees on. That
means that when you say XML, everyone knows
what you mean. But XML is really a
metalanguage: a language for dening other
languages. So, in the Boards app, you used XML,
but you dened your own elements that had names
that worked well with the Boards ‘R’ Us app.
If you wanted to update Break Neck
Pizza’s server to return XML, you’d
probably use different elements, perhaps
with names like <deliveryTime> and
<orderConrmation>. The code on your
server and the JavaScript code that you write must
use the same element names, or nothing is going
to work.
You keep saying XML is better because it’s not
proprietary, and that it’s a “standard.” But that
Boards ‘R’ Us XML uses elements like <boardsSold>
and <bootsSold>. How is that standard? I mean, who
else
is gonna use those elements?
XML is a standard...
...but how you use it isn’t.
XML
This is XML. It denes what an element
is, what an attribute is, and how things
like angle brackets, < and >, are supposed
to be used. XML is a metalanguage.
<
>
XML is
a meta-
language:
it defines
other XML
languages.