FF extension

var domView =
Components.classes["@mozilla.org/inspector/dom-view;1"].createInstance(Components.interfaces.inIDOMView);

var domDocument = document.implementation.createDocument("", "", null);
domDocument.load('chrome://crawlermodelgen/content/morningstar.xml');

domView.rootNode = domDocument;
domView.showWhitespaceNodes = true;
domView.showAnonymousContent = true;
domView.showSubDocuments = true;
domView.whatToShow &= (NodeFilter.SHOW_ALL);

var sidebarTree = sidebar.document.getElementById("cmgDOMTree");
sidebarTreeBox.view = domView;