Include Element

Revision as of 12:54, 19 December 2009 by imported>JRoush (New page: The Include element has special meaning for the Oblivion XML parser, similar to that of the ''include'' statement in C-style programming languages. An <include> element must be empty (no ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Include element has special meaning for the Oblivion XML parser, similar to that of the include statement in C-style programming languages. An <include> element must be empty (no child elements or text/numerical contents), and it must have a src trait specified:

<!-- Includes the xml code for a generic clickable button -->
<include src="button_floating.xml" />

Here the value of the src trait is the name of the xml file to include (relative to Oblivion\Data\Menus\Prefabs). Each time the parser finds an <include> element, it replaces it with the contents of this file before continuing.

Notes

  • This is a bit different from the standard usage of the src trait with Operator Elements, where src refers to another element rather than a file.
  • Attempting to include a file that doesn't exist with cause a CTD.