Injecting Jquery get response using .html() exceeds div limit

I am using an ajax call to a servlet in order to dynamically get XML configuration and show it to the user.
Using the promise, I'm injecting the response as html to the container div :

        type: "get", //send it through get method
          success: function(response) {
            $('#fullGraphXML').text('<xmp>' +response+'</xmp>');

The problem is that the XML exceeds the container div and I cant get it to fit inside using any word-wrap \ width properties to the container div. If I'm using .text() instead of .html(), it fits good but looks horrible, so I prefer to stick with the .html() function.
I tried putting it in a and it didnt help either. Any suggestios ?

enter image description here

Answers 1

Related Articles