Example of an XML document:
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="job.css"?>
<job-posting>
<title>
Job Title: Webmaster
</title>
<description>
We are looking for a Webmaster to oversee the management of
our company website. The Webmaster will be responsible for working
with other staff members to collect information for the Website, and
for creating and maintaining the Web pages.
</description>
<skills>
Expected skills:
<skill>Basic writing skills</skill>
<skill>Good communication skills</skill>
<skill>HTML</skill>
</skills>
</job-posting>
|
In general, elements act as containers for other pieces of information, including other elements and content. Each element has to have
Exclusion from this rule is empty elements that are used to described pieces of data that don't have any content. Example: <br />.
General element terminology:
The outermost element is called the root element (job-posting in the above example). All other elements and data describe the root element.
The syntax for XML comments is the same as for HTML:
| <!-- this is a comment --> |
There are three following types of sets of characters in XML documents