A quick glance at the various forum topics shows that a lot of people are having trouble with making valid XML. They're either missing tags, putting slashes in the wrong places, missing quotes or using the wrong syntax in general.
Using a good editor will help catch some of these things, and using a DTD will catch some more things. This little guide will help you get setup with an editor and DTD both.
DTD stands for Document Type Definition, and it gives you some basic rules for the layout of the XML. Which tags are allowed to go where, what attributes, etc. It's rather basic, so it won't catch all mistakes, but it takes care of a lot of things.
Notepad++ seems popular among SpellCast users, and it does have some nice editing features, and syntax highlighting. The XMLTools plugin helps it along with syntax & DTD validation. I'll cover setting this up first.
I myself use Eclipse with the XML Tools extension, which despite having almost the same name as the Notepad++ plugin is a different beast. Eclipse is a little hefty, and meant for much more complex projects, but I really like it, so I'll cover it too.
Now you can run Notepad++ and open your XML files to get your first taste.
<?xml version="1.0"?>
Now you can use the syntax checking option from the XML Tools menu, or even enable automatic syntax checking to make sure your XML is at least well formed.
<?xml version="1.0"?>
Eclipse will now point out any generic errors in your XML as you edit, and you can use ctrl-space for various auto-completions. However, auto-completion doesn't start to really shine until you start using the DTD.
The easiest way to do this is just to add the following line to your XML file, right after the XML header, and before the <spellcast> element:
<!DOCTYPE spellcast PUBLIC "spellcast" "http://windower.net/plugins/spellcast.dtd">
So the top of a typical Spellcast XML file should look like this:
<?xml version="1.0"?> <!DOCTYPE spellcast PUBLIC "spellcast" "http://windower.net/plugins/spellcast.dtd"> <spellcast> ...
The only downside to using the DTD to validate things is that XML in general is a little stricter than Spellcast is, and thus you will get errors on any element or attribute that is not in lowercase. So you will have to change things like
<Action Type="Equip" Set="Melee"/>
to
<action type="equip" set="Melee"/>
Note that names you use can be capitalized without a problem. The same goes for gear.
If you want to have a local copy of the Spellcast DTD, you can download it to your spellcast directory and replace the URL in the DOCTYPE declaration to just spellcast.dtd. At the time of writing the latest version of the Notepad++ XML Tools cannot handle this, though. However this might have changed when you read this.