dividing up xml gen out of cache.sh