User Profile
Collapse
-
parse a string of xul for XUL elements
i need to parse a xul file and get the xulElement from it.when i m using parseFromString method of DOMParser, the XMLDocument returned contains xml Elements. -
[CODE=javascript]var serializer =Components.cla sses["@mozilla.o rg/xmlextras/xmlserializer;1 "].createInstance (Components.int erfaces.nsIDOMS erializer);
var string = serializer.seri alizeToString(t his.rootnode);
var out = Components.clas ses["@mozilla.o rg/network/file-output-stream;1"].createInstance (Components.int erfaces.nsIFile OutputStream);
out.init(this.f ile, 0x20 | 0x02, 0666, null);
out.write(strin g,string.length );... -
i am storing a string obtained by converting a document fragment using the method serializeToStri ng in the xml file. The problem that i could figure out was the root element of the document fragment is not converted (only the child nodes are converted to string).So the resulting xml doc is not having a root element. How can i fix this??Leave a comment:
-
the problem that i am facing is the string that is to be passed to the parseFromString method is a xmlstring. i have an xml file stored in my local file system. but,when i read the file using javascript it is assigned to a javascript string n i m getting a parseerror when i try parse it using parseFromString method....Leave a comment:
-
convert javascript string to xml string
how can i convert a javascript string to xml string? -
replace \" with "
i am using the method parseFromString () to parse a string into DOM tree. i want to replace \" in the string with " before it is passed to the method, using javascript. how can i do this?? -
the package, which i am scripting, is installed in mozillas chrome system.so i can access my local file system.Leave a comment:
-
save document fragment
i need to save a document fragment in my local file system, which i need to retrieve later and insert into the dom tree.in what form can i save it and are there any methods in javascript for the same??
No activity results to display
Show More
Leave a comment: