I’m working on a Firefox extension which includes exporting data into a XML file
So, how do I create a new blank DOM document object via a component service in which I could write all my data before serializing it into XML with Cc["@mozilla.org/xmlextras/xmlserializer;1"].createInstance(Ci.nsIDOMSerializer).serializeToString(dom);
Alexander
This “dom” object should be a simple example for what you want. For more detail, please refer here https://developer.mozilla.org/en/How_to_create_a_DOM_tree
EDIT,
add way to access the document object in Components scope.
This is the “document” XPCOM object, you can just use it with above code. For a interface list, please refer here http://doxygen.db48x.net/mozilla/html/interfacensIDOMDocument.html