How to see xml tags in jquery alert
hi all, i am currently working with jquery..I want to show the xml contents in the alert using jquery. i am using the following code. but while executing it the output is shown as an object .i want to see the xml structure.can any one help me plz.
function test() {
var xmlDocument = $.parseXML("<Collection/>");
var FacetCategories = xmlDocument.createElement('FacetCategories');
var FacetCategory = xmlDocument.createElement('FacetCategory');
var FacetCategoryAttr = document.createAttribute('Name');
FacetCategory.addAttr(FacetCategoryAttr);
FacetCategories.appendChild(FacetCategory);
xmlDocument.documentElement.appendChild(FacetCategories);
alert(xmlDocument.xml);
}