| Garcia XML Scripts | Index |
This section describes an XML (Extensible Markup Language) format for writing behavior scripts. With XML scripts, it is possible to write a complex sequence of tasks by using a text editor.
XML scripts are run through a C language preprocessor so it is possible to define constant values, include files with defined values, and add comments. Include statements may only include files that have comments or pound-define statements. When a script includes any of these added C features, it is no longer a true XML document and third-party XML tools may not work properly with such files. However, these preprocessing features often make a script more readable and their use is encouraged when working with Garcia.
XML scripts must have the extension .XML and reside in the aUser directory. When using include statements, filenames in quotes specify files in the aUser directory and filenames in angle brackets specify files in the aSystem directory.
Any task that may be represented as a sequence of primitive tasks may be encoded as an XML script. Scripts themselves are treated as primitives and may be nested within other scripts. More complicated tasks and logic must still be written in a high-level programming language. Mixing high-level programming and XML scripts is a useful technique. Lengthy sequences of actions may be stored in scripts and can be fine-tuned in a text editor without doing any recompiling. A compiled program can handle the decision making and execute appropriate scripts when necessary.