I'm trying to read XML content from window.open into a string variable s like this via a bookmarklet:
javascript: (function() { s=window.open('https://supportcenter.checkpoint.com/supportcenter/secureKnowledgeRss'); s=s.document; alert(s); })();
However, alert just shows '[object HTMLDocument]' instead of the real XML content. Alternatively, is there any way to change the doctype of window.open to HTML in order to show the XML data as simple plain text?
I also tried this code:
javascript: (function() { s=window.open('https://supportcenter.checkpoint.com/supportcenter/secureKnowledgeRss'); var xml = new XMLSerializer(); var str = xml.serializeToString(s.document);; alert(str); })();
but it just returns:
<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body></body></html>