ExtJs容器内的SVG

I'm dynamically generating the class hierarchy of a given XSD in java back-end and I want to display that SVG within an EXtJs container/ window.

Right now, I'm doing something like this -

Ext.Ajax.request({
        url : 'schemacontroller/schemadiagram.do',
        method: 'GET',
        success : function(response){
            //console.log(response.responseText);
            var w = window.open("","Schema Diagram","left=0px,top=0px,resizable=yes,scrollbars=yes");
            w.document.body.scroll = "auto";
            w.document.write(response.responseText); // responseText contains the whole of the SVG scripts along with the html generated
        },
        failure : function(response){
            Ext.MessageBox.alert('Error','Failed to load the schema diagram!');
        }
    });

Is there any better way to achieve this? Any inputs/ thoughts would be most appreciated.

Well, there is always a better way how to do things. The only question is if it is worth the effort to find out and implement. Does it work for the user? Is the user fully satisfied with it? If yes, there's nothing to solve.

If not then take a look at Ext.draw.Container. You can create SVG engine there and then load the svg script, however, not full, just the drawing itself.