You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code:
// create empty document
var parser = new DOMParser;
var xmldoc = parser.parseFromString('');
// serialize document
var serializer = new XMLSerializer;
var doctxt = serializer.serializeToString(xmldoc);
console.log("xml:",doctxt);
The result:
I don't think it's a good way to serialize comments back.
BTW. the questions is to how to create Document for serialization if exported "classes" are DOMParser and XMLSerializer? Without tricks I can only create document by parsing an empty one
The text was updated successfully, but these errors were encountered:
The code:
// create empty document
var parser = new DOMParser;
var xmldoc = parser.parseFromString('');
The result:
I don't think it's a good way to serialize comments back.
BTW. the questions is to how to create Document for serialization if exported "classes" are DOMParser and XMLSerializer? Without tricks I can only create document by parsing an empty one
The text was updated successfully, but these errors were encountered: