Reading XML with Coldfusion

Yesterday I had to read in some highly detailed XML with coldfusion programming and turn certain items into lists.  Then I was to compare these lists of file names to the files that are currently on the server and delete the ones that weren’t used.  A simple XML file would have been nice, but the depth of this XML had me running seven nested items deep into the structure.  Also, I needed to be extracting files names from three different locations and different depths of the XML.  In order to properly read through each item and extract the data I needed from deep within, I had to venture into the territory of nested loops…  many nested loops.

So with my brain trying to fire on all cylinders and using cfdump statements like they were free candy, I arduously managed to traverse the unseen with my code.  Though it was one of those advanced programming things that starts to make me lose my mind, that also means that it brings the glory of satisfaction and the programmer’s high when it finally all worked correctly.  So with that task complete, I now stand on the peak of the highest mountain and proudly look down upon the small villages as their new king.  That or I will just move onto my next task.