* @throws XMLParseException if the xml element doesn't represent the given tag.
*/
private void checkTag(XMLElement xml, String tag) {
final String actualTag = xml.getName();
if (!tag.equals(actualTag)) {
throw new XMLParseException("", "tag is not '" + tag + "' (actual: '" + actualTag + "')");
}
}