Do you mean something like this function?
http://faser.net/mab/chrome/content/js/utils.js
/**
* Insert an XML string in a XML/XUL document
*
* @param {XML Element} node
* @param {string} sxml The XML string
* @param {bool} isXul Indicate if the string is a XUL XML
* @param {bool} insertBefore Indicate if the XML should be appended or inserted before the XML element
* @return bool
* Thanks to Zero (zer0.shock@libero.it)
*/
function innerXML(node,sxml,isXUL,insertBefore) {...}
You can create a brand new shiney XULDocument using Components.classes["@mozilla.org/xul/xul-document;1"].createInstance().
(one of the many many things Gecko/layout registers at http://lxr.mozilla.org/seamonkey/source/layout/build/nsLayoutModule.cpp#824)
Posted by James Ross at September 26, 2005 4:41 AM