I use CFSCRIPT to parse XML.
When you test for the existence of a node, you should use structKeyExists(); This requires two paramenters, the scope and the variable. The scope cannot be in quotes. The variable MUST be in quotes.
structKeyExists(SCOPE, "Variable");
Here's s short bit that might help.
// BOOTH NUMBER
BoothInfo.BoothNumber = ResponseNodes[i].BoothNumber.XmlText;
writeOutput("<h3>BoothNumber - #BoothInfo.BoothNumber# </h3>");
// CATEGORIES
if (structKeyExists(ResponseNodes[i].ProductCategories, "Category")) {
Categories = ResponseNodes[i].ProductCategories.Category;
CatIDList = "";
for (j = 1; j lte arrayLen(Categories); j++) {
CatID = ResponseNodes[i].ProductCategories.Category[j].XmlAttributes.ID;
CatIDList = listAppend(CatIDList, CatID);
}
BoothInfo.CatID = CatIDList;
} else {
BoothInfo.CatID = "";
}
writeOutput(BoothInfo.CatID);