Q:

convert a string in order to access the dom elements of it

I have a string which contains my response. 
var c = atob(btoa(String.fromCharCode.apply(null, new Uint8Array(event.getParameter('response'))))); 

this returns the elements of the document in a string format.
I want to access the svg element that is inside this response

How can I convert the string in order to access the elements inside it?

A:

You could insert the string you get into a hidden element, and append them into the body of the document. Then retrieve the element you want via proper selectors:

var elemString = '<div id="yourElement">My element</div>';

$('body').append('<span id="test" style="display:none">' + elemString + '</span>');
alert($('#test').html());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

