wiki:XMLIntroduction

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 <bold>content</bold></nestedElement>
        <anotherElement with="attribute" another='one'>Elements can have attributes <emptyTag/>, as well</anotherElement>
        <!-- I am a comment <abc>everything here is</abc> ignored -->
        <question>did we already talk about &amp; 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:
    • <: &lt;
    • >: &gt;
    • &: &amp;
    • ": &quot; (To a lesser extent, namely only in attribute values)
    • ': &apos; (To a lesser extent, namely only in attribute values)

Unicode

Last modified 9 years ago Last modified on Mar 16, 2015, 3:03:37 PM