I'm making a request to an external url using javascript and I get a response, which is in a text form. I want to retrieve an element with some id (e.g "id1") from the response (without jQuery) and in general execute some javascript code on this html response. This looks so:
var xmlHttp = new XMLHttpRequest()
xmlHttp.open( "GET", "some url", false )
xmlHttp.send( null )
var mainpage = xmlHttp.response
Basically I want to get a content of a div with id=id1 in mainpage, retrieve some of his childs and some other basic javascript operations.