How to parse a XML dom from a string?



It is possible to build a XML DOM from scratch:



var data = document.implementation.createDocument("", "", null);
data.appendChild(data.createElement("data"));


But I can not find a method which builds an XML DOM from a string (not URL):



var data = document.implementation.createDocument("", "", null);
data.parse_document("<data/>");


Do I have to write the parse_document from scratch or is it available somehow?


No comments:

Post a Comment