Ian Fondevilla wrote:
> 2. We could write the contents of a database in XML format. In
> addition to an XML formatted file, what else would be required in
> order to use the database data?
1) A way to get the data from the database into the XML document. For a
list of products that do this, see:
2) A way to parse the XML document and get the data into your
> 3. When you read XML from a file into a browser, the browser does not
> necessarily display the code properly? Why?
This depends on the browser you are using. Some browsers are designed to
understand only HTML, not XML, so it is not surprising they cannot
display the XML correctly.
Browsers that do understand XML (I can't remember which these are -- IE
5 and 6, Mozilla 6?) generally won't know how to display it unless you
also pass in a stylesheet. (It's important to remember here that
browsers are written to know what to do with HTML's <p> and <a> tags;
they have no clue what to do with the <IDefinedThisTagMyself> tag.)
> 4. What steps are logically necessary to define the XML code for a
What do you mean by "XML code"? Do you mean the text and tags? If so,
the logical steps are:
1) Decide what data you want to put in the XML document.
2) Design (or find) an XML vocabulary that can represent your data.
3) Create the document, such as with a text editor or a program that
creates the document.