1.1 - Stuff you'll need
Technically all you'll need is notepad, but these tools help make your life a bit easier:
Any archiving program that can open ZIP files. I use WINRAR .
A dedicated XML editor likeXML Marker . Get it. You'll thank yourself for it.
A basic HTML editor to help with writing reference pages. You can technically use FG2'sinternal editor but that one doesn't have support for making tables, and those are a bother todo by hand.
Basic knowledge of writing HTML. This guide assumes it. If you don't have it,learnwhatan HTML tag is, and learn to properly use the most basic ones. Now let's get down to business.
1.2 - XML Primer (skip to the next section if you know XML and/or Kung Fu)
eXtensible Markup Language is a machine-independent, human readable way of
data. It is very similar to HTML in concept but where HTML's purpose is to formatand display data, hence well-defined tags, XML is designed to organize and store it. This means thatit has no predefined set of tags, those are up to the software reading it, in this case FG2. This alsomeans that
you can make up your own tags
where appropriate. It does however have a few rules thatyou should know about and keep in mind. I'm listing them here in order to avoid common mistakesand make sure your modules work as intended:
All XML files start with a declaration that looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
It mentions the XML version and the character set (in this case Latin-1/West European)Don'tforget to include that if you're building a module from scratch.
The first tag that comes after the declaration is the root element. The XML must start andend with that tag. In FG2 the root element is simply <root>, which should be the second lineafter the declaration(empty lines don't count). Conversely the last line should be </root>,ending the tag.
That reminds me – make sure every tag is properly closed. XML marker will scream at youif you leave any open ones by the way. While you're at it make sure that:
All tags must be properly nested. Simply put
is correct, while
is not! Close child tags before closing their parent tags. Don't let them overlap.
When naming tags – you can use letters and numbers as well as special characters. Stayaway however from the characters ./:$& for obvious reasons. Also don't
the tag namewith a number. Finally, be careful when giving tags names so they don't conflict withdedicated FG2 tags, more on those later
When giving tags attributes don't forget to quote the value, like so:
If you need to type & within your text, use & which is an entity reference, to avoidconflicts. There are more. Google them. While you're at it Google XML Tutorial for moreinformation
2 - FG2 general style Tags
While XML has fully customizable tags, FG2 uses some in common with HTML where textformatting is concerned. That said it doesn't use all HTML tags, and of those it uses, some work differently. Furthermore it has some of its own custom style tags. I'll reference each here: