# Importing SVG as a string using bpy

I was wondering if there is a way to import a raw SVG string using bpy rather than importing a file. The reason is that I have the data available in a database. I could write a file and import it but I rather skip that step, if possible.

UPDATE:

What I would like to do in the end is use the SVG data to make an extruded object in Blender. The expected SVG elements will be shapes (rect, path, polygon, ...).

• SVG is just xml. You could just parse it as you would an xml and put the data where you want it. Is that what you're trying to do? – cmomoney Dec 15 '16 at 16:56
• I updated my question to clarify what I am aiming for. I could use SVG.js for example to pre-process the SVG data. With the toPath and toPoly plugins, all SVG elements can be converted to polygons so I could use the point data to build a mesh in Blender. Using the SVG data as is in Blender will be easier though :) – wout Dec 15 '16 at 18:15