Preloading an XML/PHP File

I have an php file that is pulling data from a backend mysql database and formatting it as XML I have that part worked out fine. I want to attach a simple preloader to it no percentage or anything just a rotating circle similar to macromedia’s with a message saying “loading XML Data” my problem is the code… I’ve worked with preloaders before I’m just lost on where to being with this as I normally use _root.getbytes… and I’m not sure where I should begin