Version 3 (modified by 10 years ago) (diff) | ,
---|
Introduction
This is an introductory text to XML, the extensible markup language used for our texts.
There is also the W3C Recommendation.
Basic facts about XML
- An XML document is a plain text file, preferably in Unicode encoding
- The structure is made up out of nested elements, like a matroshka.
<root> <nestedElement>With content</nestedElement> <anotherElement with="attribute" another='one'>Elements can have attributes </emptyTag>, as well</anotherElement> <!-- I am a comment <hidden>everything here is</hidden> ignored --> <question>did we already talk about & entities?</question> </root>
As with a matroshka, also in XML, you cannot put half a puppet into the bigger puppet: they have to be properly nested. - Some characters are forbidden, they have to be escaped by entity references:
<
:<
>
:>
&
:&
"
:"
(To a lesser extent, namely only in attribute values)'
:'
(To a lesser extent, namely only in attribute values)