HTML and CSS Reference
In-Depth Information
Get Results button.
A valid XML Schema
Definition will have
no error messages
(Figure 12-12).
Click the Upload and
message shows
schema validated
with no errors
I have an error; the file
did not validate. What
do I do?
You need to check your
code and make sure
everything is spelled and
formatted as indicated
in the tables.
Check for missing tags or tags not closed properly.
Figure 12-12
Creating the XML document file.
The first step in creating an XML document is to create the prolog. The following tasks are
necessary to create the prolog and begin a well-formed XML document:
1. Enter the XML declaration.
2. Enter an XML comment (HTML comment tag) to identify the name of the XML file as
Creating the Prolog in an XML Document
The first statement in an XML prolog is the XML declaration. The XML
declaration is a processing instruction in the prolog that provides additional information
to the application that will process the XML document. Although optional, the first
processing instruction in most XML document prologs is the XML declaration. This
processing statement is the same as described in Table 12-8 on page HTML 572.
The prolog can also contain comments that provide a user or developer with
information about the document. XML comments are very similar in form to HTML
comments. As with HTML comments, the browser or parser ignores the XML comments.
Table 12-16 presents the general form of an XML comment.
Table 12-16 General Form of an XML Comment
General form:
<!- - comment statements -->
Comments are optional and can be placed anywhere between tags, but not within a tag.
Comments must begin with the left angle bracket (<), an exclamation point (!), and double
hyphens (--). The comment must terminate with the double hyphens (--) and the right
angle bracket (>).
Valid example:
<!- - File Name: chapter12-1products.xml - ->
<Tag><!- - Comment about tag --></Tag>
Invalid example:
<Tag <!- - This tag is new -->>Data</Tag>
Search WWH ::

Custom Search