Visit Mozilla.org

Talk:DOMParser

From MDC

Questions on the DOMParser and the object being returned upon parse:

is this a document fragment object or does it represent a real document object
if it is a document fragment object, then importing the object into the dom should be not that much of a problem
if it is a document object, then how can the document object be made a document fragment object in order to import it into the currently active document of the user agent's window?

Perhaps a few more examples displaying how to then import the object into the dom etc. would be required in order to show the full potential of the parser in regard to dynamic processing of XML

does the DOMParser also accept external documents to be parsed given by arbitrary but valid URLs in the same context of the page being currently displayed, ie does it require the external document to reside on the same domain or may that external document come from near everywhere, possibly allowing cross site vulnerabilities to come up once more?

Carsten.klein 05:34, 2 March 2006 (PST)

Re: the last question. Did you see the reference page? You need XMLHttpRequest to parse documents at a given URI. --Nickolay 05:51, 2 March 2006 (PST)