Sybase 2 Barcode Reader User Manual


 
CHAPTER 14 Exporting and Importing XML Data
DataWindow Designer User’s Guide 381
XML Schema provides an alternative mechanism for describing and validating
XML data. It provides a richer set of datatypes than a DTD, as well as support
for namespaces, including the ability to use prefixes in instance documents and
accept unknown elements and attributes from known or unknown namespaces.
For more information, see the
W3C XML Schema page at
http://www.w3.org/XML/Schema
.
Well-formed
documents
The second way to specify XML syntax is to assume that a document is using
its language properly. XML provides a set of generic syntax rules that must be
satisfied, and as long as a document satisfies these rules, it is said to be
well-formed. All valid documents must be well-formed.
Processing well-formed documents is faster than processing valid documents
because the parser does not have to verify against the DTD or XML schema.
When valid documents are transmitted, the DTD or XML schema must also be
transmitted if the receiver does not already possess it. Well-formed documents
can be sent without other information.
XML documents should conform to a DTD or XML schema if they are going
to be used by more than one application. If they are not valid, there is no way
to guarantee that various applications will be able to understand each other.
XML syntax
There are a few more restrictions on XML than on HTML; they make parsing
of XML simpler.
Tags cannot be
omitted
Unlike HTML, XML does not allow you to omit tags. This guarantees that
parsers know where elements end.
The following example is acceptable HTML, but not XML:
<table>
<tr>
<td>Dog</td>
<td>Cat
<td>Mouse
</table>