12Jan/100
Parsing the WoW Armory – Part 2.1
I forgot to post this information in Part 2 of Parsing the WoW Armory. When parsing the guild-info.xml file, some fields are represented by numerical values. Below is conversion table from XML numerical representations to actual values.
genderId:
0 - Male
1 - Female
raceId:
1 - Human
2 - Orc
3 - Dwarf
4 - Night Elf
5 - Undead
6 - Tauren
7 - Gnome
8 - Troll
10 - Blood Elf
11 - Draenei
classId:
1 - Warrior
2 - Paladin
3 - Hunter
4 - Rogue
5 - Priest
6 - Death Knight
7 - Shaman
8 - Mage
9 - Warlock
11 - Druid
For easy converting from numerical to actual values I would recommend using a PHP array(). Below is an example of the Sorted Guild list from Part 2 with the addition of the class of each character included.
< ?php function sortedList($x) { $classArray = array(1 => "Warrior", 2 => "Paladin", 3 => "Hunter", 4 => "Rogue", 5 => "Priest", 6 => "Death Knight", 7 => "Shaman", 8 => "Mage", 9 => "Warlock", 11 => "Druid"); $array = array(); foreach($x as $char) { $array[] = getName($char)." - ".getLevel($char)." - ".$classArray[(int)getClassId($char)]."<br />"; } sort($array); return $array; } ?>
