Getting XML into a jQueryUI dialog

Getting XML into a jQueryUI dialog

I have an issue with web app. I need to be able to display xml in a popup dialog if selected. The jQueryUI dialog function appears to work fine up to a point. When I push the data, the only thing that is displayed is the content information of the xml. All of the tags, attribute, etc., information is missing. I need to be able to show the whole thing and 'pretty printed'. I haven't seen anything that allows me to specify the format of the xml.
 
I would truly appreciate any help with this.
 
Thank you!