Skip to content

Namespace Apogee.Content.Xml

Classes

DecodeResult

What made of an element: its data (with the defaults filled in, whatever the problems), and the problems.

Def

One definition: an element with an id, as it is after every file that touched it, and what it decodes to.

DefBool

DefDatabase

The definitions of a game and its mods: every .xml file of the content folders, read in load order (a folder's files sorted, then its folders, each the same way), each file holding one definition (a root element with an id) or a list of them (the root's children). A definition is identified by its type (the element's name) and its id. A later file replaces a definition with the same id (with a warning that names both files), patches it with patch="true" (see ), or removes it with remove="true". Each definition is then checked against the schemas and decoded; what is wrong is in , and the definition is still there, with whatever could be made of it.

DefFolder

A folder of definitions: where it is in the file system, and the package it belongs to (the first thing that loads is the game's own).

DefList

DefNumber

DefRecord

A record: members by name, in the order they were decoded (attributes first, then child elements as the schema declares them).

DefSource

A file that made a definition: is where the definition starts in it.

DefText

DefValue

What a definition decodes into (): text, a number, a boolean, a list, or a record of named members, nested as deep as the XML was. A plain tree that scripts, tools and C# read alike; writes it compactly ({id: "crate", weight: 12.5, tags: ["a", "b"]}), which is what tests compare.

DefVector

Three numbers written "x y z" (or "x, y, z") in a vector3 attribute: a vector in scripts.

SchemaException

A schema is invalid, or uses something the engine's XSD subset does not have. The message names the file and line.

SchemaProblem

Something wrong in a file: says where in the element (Crate.items[2].count), where in the file.

SchemaSet

XSD, the parts content definitions need: checking XML against a schema and turning it into data (). A set is every .xsd file loaded into it (and the ones they include), so that a package can bring the schema of the definitions it adds, and the children it adds to an open element of another's.

Supported: element and attribute declarations (type, ref for elements, default, fixed, use, minOccurs, maxOccurs), complexType with sequence, choice and all (the order of children is not checked; a choice's members each repeat as they say, so a choice repeated stands for any order), group and attributeGroup, complexContent and simpleContent extensions, any and anyAttribute, simpleType restrictions (enumeration, minInclusive, maxInclusive, minExclusive, maxExclusive, pattern, minLength, maxLength, length) and lists, the built-in types, annotation, and include/import of a file by its location (no namespaces: names are plain). Anything else is a that names it, so a schema never means less than it says.

XmlBinary

A binary encoding of an XML document, for cooked packs (APXB): the tree holds, with every name and value in one string table and the nodes in document order. It is smaller than the text and read without parsing it, and it gives back exactly the tree that was written: names, attributes in their order, text, lines and children. Read a file that may be either form through .

XmlFile

Reads an XML file of the game, whichever form it is in: text, as it is written and edited, or cooked (), as a shipped pack holds it. A cooked file keeps the path of its source, so this is the one way to read an authored or definition file; reading it as text () would give the binary.

XmlNode

An element as content files and schemas are read: its name, its attributes in the order they were written, its children, its text, and the line it starts on. Comments and processing instructions are dropped, a DTD is refused (nothing is loaded from outside the file), and names keep their prefix (xs:element, xsi:type): content is not namespace-aware, so a prefix only has to be declared.

XmlParseException

A file is not well-formed XML. is where the reader gave up.

Structs

XmlProperty

An attribute as written: its name (with a prefix, if it has one) and its text. (Not called XmlAttribute: a type with that ending is read as an attribute class.)

Enums

DefKind

DefRole

What a file did to a definition.

ProblemSeverity