> I've tried to add CC but I haven't find differences.
I changed the DTD line to read this:
<!ELEMENT EMAIL (TO, FROM, CC?, SUBJECT, BODY)>
and it parses correctly on my machine. You need to add a definition of CC if
you actually want to use one:
<?xml version="1.0"?>
<!DOCTYPE EMAIL [
<!ELEMENT EMAIL (TO, FROM, CC?, SUBJECT, BODY)>
<!ELEMENT TO (#PCDATA)>
<!ELEMENT FROM (#PCDATA)>
<!ELEMENT CC (#PCDATA)>
<!ELEMENT SUBJECT (#PCDATA)>
<!ELEMENT BODY (#PCDATA)>
]>
<EMAIL>
<TO>m.*@try.com</TO>
<FROM>m.*@try.com</FROM>
<CC>me@nowhere.com</CC>
<SUBJECT>My first DTD</SUBJECT>
<BODY>Hello, World</BODY>
</EMAIL>
When I say <execute the source code> I mean that it's no clear in my mind
who process the
XML code.
When you double click on a XML page what happens ?
I don't know. It depends how you've got your machine set up. I use Linux for
the most part, so I'm probably not the person to ask. Maybe IE will open
and try to display it? Maybe an editor will open so you can edit it?
1) Internet explorer process the page with an interpreter inside ?
IE will do its best to show you the XML is a very general way. It doesn't,
as far as I know, "process" it other than parsing it in order to display
it.
2) Is it necessary that the page is on a server with particular
configurations for XML (enabling somethng on Apache, for example) or you
can put the page on the desktop of your Win2000 and just double click on
it ?
No, no server software is needed. Leaving the file somewhere on your disk
and pointing an XML processor of some sort at it is enough.
3) What else to understand architecture
XML is a language for describing data. The data, by itself, isn't much use.
The best you can do is check that the data is valid; i.e. that the data
matches the DTD description of what the data should look like.
Something needs to process that data, either to display it, or in some way
work with it in order to get something done.
Your XML describes an email. OK, fine. But what do you want to do with that
information? Display it in some way? Use it to send the described email?
There isn't much point in just having a bit of XML data sitting on your
disk. What do you intend to do with it, and how do you intend to do that?