You are correct, the code to produce the XML is simple and I
have it working, only I get the "nullpointer" error when attempting
to run it at my root with recursion turned on. I've attached the
code below, which has successfully produced a site map in a smaller
test directory.
The code question was just as an aside because I didn't see
anyone with this issue in other posts. It works recursively on a
directory with several layers deep and about 1000 files total.
However, when I run it recursively on development in webroot (which
contains archived directories, etc and who knows how many files)
that is when i get the null pointer error. I know that I ran shell
script to produce a report on all HTM* and CFM files and it number
well over 10k.
Of course, I could run 2 cfdirectory - one filtering for CFM
files and one for HTM* files, which might not be a memory hog. I
was asked to look at pre-existing solutions before continuing
development.
As far as server set up, we are running Sun One webservers
w/CFMX7 - I don't know about the RAM.
As far as a solution that produces both HTML and XML site
maps, well I have to prove that it isn't a simple solution before I
can say it can't be done.
If I am to continue working on this solution, I will "clean
it up" (i.e. it will be a UDF or CFC) and rely on exclusions in
robots.txt to eliminate any iles/directories and the logic will
probably have to be changed to accomplish that feature. This was
just a proof of concept for my boss to see if it could be done or
not in-house.
Thanks for any input.