Hello,
I am trying to populate a xul tree from an XML document.
I am using the "@mozilla.org/inspector/dom-view;1" component.
The xul tree load the XML document structure correctly: I can see the
"+" in the right place, but the problem is that no label is displayed at
all.
I just have a correct but completely anonymous XML structure.
Here is my code:
*****************
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;
*****************
What do I do wrong? Is this the right way to face this issue?
Luca
|