What is XML?[]
XML is a way to organize information in a way that computers can read it, while still making some sense to humans. It is a popular way to format game information because it is easily moddable by players. In Heroes V, the XML files have an XDB extention. They are easily edited with basic text programs.
How do you read XML?[]
The most important feature in XML is tags. They tell the computer what the information it is reading means. There are three types of tags that you'll see editing Heroes files.
- Start Tags: <example> These are simply enclosed in the <> symbols.
- End Tags: </example> These mean it is the end of the section.
- Empty Tags: <example/> These mean there is no information in the section.
An example is the <SpellIDs> tag. It is used in Heroes 5 to list what spells the object has. A new random hero's XML information will simply have <SpellIDs/> because they haven't learned any spells yet. Yet if you create a custom hero at the start of the game the <SpellIDs> section will look something like this:
<spellIDs> <Item>SPELL_MAGIC_ARROW</Item> <Item>SPELL_MAGIC_FIST</Item> <Item>SPELL_LIGHTNING_BOLT</Item> </spellIDs>
Note the indent is important to make it easier to see what information fits between what tags.