Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data types

XMLang has several built-in data types.

All text content in XMLang is considered a string, and can be converted to other types as needed. For example, these are different:

<set var="n"><int>42</int></set>

<print>
    <add>
        <get var="n" />
        1
    </add>
</print> <!-- prints 421 -->

<print>
    <add>
        <get var="n" />
        <int>1</int>
    </add>
</print> <!-- prints 43 -->

XMLang supports the following data types:

  • null: Represents the absence of a value.
  • int: Represents an integer value.
  • float: Represents a floating-point number.
  • bool: Represents a boolean value, either true or false.
  • string: Represents a UTF-8 encoded string of text.

There are no lists, arrays, dictionaries, objects, classes, or other complex data types in XMLang.