HTML and CSS Reference
In-Depth Information
To Create a New XML Document and Enter the Prolog Code
The code in Table 12-17 contains the code for the prolog in the XML file.
Table 12-17 Code for the Prolog
<?xml version=”1.0” encoding=”utf-8” standalone=”yes” ?>
<!-- File Name: chapter12-1products.xml -->
Line 1 is the XML declaration that identifies this as an XML document using XML version 1.0, uses the utf-8
coding standard, and identifies that this is a stand-alone file. Line 2 is a comment stating the name of the XML file.
Prior to the recommendation by W3C, a Document Type Definition (DTD) would follow. Because this text follows
the current recommendation to use the XML Schema Definition, the XSD file created previously will be attached
in the document instance code. The following steps create a new XML document using Notepad++ and enters the
prolog code.
If necessary, activate
the Notepad++
If necessary, click File
new blank Notepad++
document with filename
on the menu bar, then
click New to create
a new Notepad++
With the USB drive
plugged into your
computer, click File
on the menu bar, and
then click Save As.
Figure 12-13
If necessary, navigate to the Chapter12\ChapterFiles folder on UDISK (G:).
chapter12-1products.xml in the File name text box.
Click the Save button in the Save As dialog box (Figure 12-13).
If necessary,
click line 1.
Enter the XML code
shown in Table 12-17
to create the
prolog and press
the e n t e r key twice
(Figure 12-14).
press e n t e r
key twice
Why isn't the link to
the XSD file in the
It will be entered as
part of the root element of the document instance.
Figure 12-14
Search WWH ::

Custom Search