GF_Node *gf_sm_load_svg_from_string(GF_SceneGraph *in_scene, char *node_str)
{
	GF_Err e;
	GF_SVG_Parser *parser;
	GF_Node *node;
	GF_SceneLoader ctx;
	memset(&ctx, 0, sizeof(GF_SceneLoader));
	ctx.scene_graph = in_scene;
	ctx.type = GF_SM_LOAD_SVG;

	e = gf_sm_load_initialize_svg(&ctx, node_str, GF_TRUE);

	parser = (GF_SVG_Parser *)ctx.loader_priv;

	if (e != GF_OK) {
		if (parser) {
			if (parser->fragment_root) gf_node_unregister(parser->fragment_root, NULL);
			parser->fragment_root=NULL;
		}
		load_svg_done(&ctx);
		return NULL;
	}

	node = parser ? parser->fragment_root : NULL;
	/*don't register*/
	if (node) node->sgprivate->num_instances--;
	load_svg_done(&ctx);
	return node;
}
GF_Node *gf_sm_load_svg_from_string(GF_SceneGraph *in_scene, char *node_str)
{
	GF_Err e;
	GF_SVG_Parser *parser;
	GF_Node *node;
	GF_SceneLoader ctx;
	memset(&ctx, 0, sizeof(GF_SceneLoader));
	ctx.scene_graph = in_scene;
	ctx.type = GF_SM_LOAD_SVG;

	e = gf_sm_load_initialize_svg(&ctx, node_str, GF_TRUE);

	parser = (GF_SVG_Parser *)ctx.loader_priv;

	if (e != GF_OK) {
		if (parser) {
			if (parser->fragment_root) gf_node_unregister(parser->fragment_root, NULL);
			parser->fragment_root=NULL;
		}
		load_svg_done(&ctx);
		return NULL;
	}

	node = parser ? parser->fragment_root : NULL;
	 
	if (node) node->sgprivate->num_instances--;
	load_svg_done(&ctx);
	return node;
}