You need to distinguish what you are capturing in the variable (which is almost certainly everything) from what you can see in a browser. For example, of course you don't see the stuff inside XML codes, the browser hides tags it doesn't recognize. I suspect that if you use view source in your browser, all of the stuff you thought you weren't capturing will be there. You need to use HTML to display things properly.