XML Help - xml structure

I’ve started looking into an old project that I stopped midway. I’ve never been good with xml, and I can’t remember for the life of me how I structured the xml for this particular file.


function loadCategories(topic)
{
    thisFolder = topic;
    categoriesLoader.load("words.xml");
}
function parseCategories(thisFolder)
{
    allCategories.splice(0);
    if (categoriesLoader.firstChild.nodeName == "gamedata")
    {
        var _loc1 = categoriesLoader.firstChild;
        var _loc3 = 1;
        for (j = 0; j < _loc1.childNodes.length; j++)
        {
            if (_loc1.childNodes[j].nodeName == thisFolder)
            {
                allCategories[0] = _loc1.childNodes[j].childNodes[0].nodeName.toString();
                for (i = 1; i < _loc1.childNodes[j].childNodes.length; i++)
                {
                    if (_loc1.childNodes[j].childNodes*.nodeName != _loc1.childNodes[j].childNodes[i - 1].nodeName)
                    {
                        allCategories[_loc3++] = _loc1.childNodes[j].childNodes*.nodeName.toString();
                    }
                }
                if (thisFolder == "FirstFolder")
                {
                    createFolderText();
                    continue;
                }
            }
        }
    }
}
function parseWords()
{
    if (wordsLoader.firstChild.nodeName == "gamedata")
    {
        words.splice(0);
        categoryArray.splice(0);
        folderArray.splice(0);
        var _loc1 = wordsLoader.firstChild;
        numWordsLoaded = 0;
        for (j = 0; j < _loc1.childNodes.length; j++)
        {
            if (_loc1.childNodes[j].nodeName == thisFolder)
            {
                for (i = 0; i < _loc1.childNodes[j].childNodes.length; i++)
                {
                    if (_loc1.childNodes[j].childNodes*.nodeName == rolledOver)
                    {
                        var _loc2 = _loc1.childNodes[j].childNodes*.firstChild.nodeValue.toString();
                        words.push(_loc2);
                        folderArray.push(thisFolder);
                        categoryArray.push(rolledOver);
                        ++numWordsLoaded;
                        continue;
					}
                    ++_loc1.childNodes[j].childNodes;
                }
            }
        }
        wordList.showList();
    }
}