To display your svg within a canvas, you first have to convert it using a parser/renderer utility such as http://code.google.com/p/canvg/
(code adapted from: Convert SVG to image (JPEG, PNG, etc.) in the browser, not tested)
// the canvg call that takes the svg xml and converts it to a canvas
canvg('canvas', $("#my-svg").html());
// the canvas calls to output a png
var canvas = document.getElementById("canvas");
var img = canvas.toDataURL("image/png");