Parsing log files in a folder in ColdFusion
- by Simon Guo
The problem is there is a folder ./log/ containing the files like:
jan2010.xml, feb2010.xml, mar2010.xml, jan2009.xml, feb2009.xml, mar2009.xml ...
each xml file would like:
<root><record name="bob" spend="20"></record>...(more records)</root>
I want to write a piece of ColdFusion code (log.cfm) that simply parsing those xml files. For the front end I would let user to choose a year, then the click submit button. All the content in that year will be show up in separate table by month. Each table shows the total money spent for each person. like:
person cost
bob 200
mike 300
Total 500
Thanks.