I'm trying to save a Polymaps map consisting of a json layer as an image file using canvg as described here. The problem I'm running into is that when I try to construct the svg string using the XML serializer, the contents of the sub-elements are not included in the string. These elements are where the geographical information is stored, so my svg string doesn't contain the necessary information to draw the map onto the canvas.
Any idea why this is happening or how to include all the svg sub-elements in the svg string?