Dumping raw XML using ASP

When working on other people’s code it sometimes difficult to figure where the data is coming from and you really don’t have the time to spend figuring it out. We were having a problem with an ASP page that was blowing up when a certain XML field was empty so I wanted to simple command to dump the raw XML. Either the XML field had a different name or it wasn’t in the XML file. I knew the command must exist but it was surprising difficult to find. Here is what I used to dump an XML object called xmlData.

response.write xmlData.documentElement.xml

OBTW the element was not in the XML file.