XML |
|
There is not much XML knowledge required to write HAWHAW XML
files. There are some common XML rules, which apply for HAWHAW XML
too. But these rules are very easy to learn. XML files must be
"wellformed". The basic rules how to write wellformed HAWHAW XML
files are summarized in the following paragraphs:
|
|
Each XML file starts with the XML declaration: <?xml
version="1.0"?>
Even though HAWHAW does not require
this line, you should not omit it without good reasons. The version 1.0
specifies the XML version and not the HAWHAW version. It is
unlikely that you ever have to modify this value.
|
|
All XML documents must have a root tag. In case of a HAWHAW XML file the
root tag is
<hawhaw>. The
<hawhaw> tag is the first tag
in a HAWHAW XML file and the closing </hawhaw> tag is the last one.
|
|
All XML elements must have a closing tag. Omitting a closing tag
will result in a XML error during the parse procedure.
|
|
All XML elements must be properly nested:
<?xml version="1.0"?>
<hawhaw>
<deck>
<text>This is correct</text>
</deck>
</hawhaw>
<?xml version="1.0"?>
<hawhaw>
<deck>
<text>This is wrong!</deck>
</text>
</hawhaw>
|
|
|
In XML all attribute values must be properly quoted:
Correct: <deck align="center">
Wrong: <deck align=center>
|
|
|
The syntax of comments is same as in HTML:
<!-- This is a comment -->
|
|
|
Unlike HTML, XML tags are case sensitive:
<text>This is correct</text>
<text>This is wrong!</TEXT>
|
|
Copyright / Disclaimer |
|
Copyright (C) Norbert Huffschmid (2002). All Rights Reserved
|
|
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its usage may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, except as required to
translate it into languages other than English.
|
|
This document and the information contained herein is provided on an
"AS IS" basis and THE AUTHOR DISCLAIMS ALL WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|