static GF_Err DumpMultipleReplace(GF_SceneDumper *sdump, GF_Command *com)
{
	u32 i;
	GF_FieldInfo info;
	GF_CommandField *inf;
	if (!gf_list_count(com->command_fields)) return GF_OK;

	DUMP_IND(sdump);
	if (sdump->XMLDump) {
		gf_fprintf(sdump->trace, "<Replace extended=\"fields\" atNode=\"");
		scene_dump_vrml_id(sdump, com->node);
		gf_fprintf(sdump->trace, "\">\n");

		sdump->indent++;
		i=0;
		while ((inf = (GF_CommandField *) gf_list_enum(com->command_fields, &i))) {
			gf_node_get_field(com->node, inf->fieldIndex, &info);
			info.far_ptr = inf->field_ptr;

			DUMP_IND(sdump);
			if (gf_sg_vrml_get_sf_type(info.fieldType) != GF_SG_VRML_SFNODE) {
				gf_fprintf(sdump->trace, "<repField atField=\"%s\" ", info.name);
				gf_dump_vrml_simple_field(sdump, info, com->node);
				gf_fprintf(sdump->trace, "/>\n");
			} else {
				gf_fprintf(sdump->trace, "<repField>");
				gf_dump_vrml_field(sdump, com->node, info);
				gf_fprintf(sdump->trace, "</repField>\n");
			}
		}
		sdump->indent--;

		DUMP_IND(sdump);
		gf_fprintf(sdump->trace, "</Replace>\n");
	} else {
		gf_fprintf(sdump->trace, "MULTIPLEREPLACE ");
		scene_dump_vrml_id(sdump, com->node);
		gf_fprintf(sdump->trace, " {\n");
		sdump->indent++;
		i=0;
		while ((inf = (GF_CommandField *) gf_list_enum(com->command_fields, &i))) {
			gf_node_get_field(com->node, inf->fieldIndex, &info);
			info.far_ptr = inf->field_ptr;
			gf_dump_vrml_field(sdump, com->node, info);
		}
		sdump->indent--;
		DUMP_IND(sdump);
		gf_fprintf(sdump->trace, "}\n");
	}
	return GF_OK;
}
static GF_Err DumpMultipleReplace(GF_SceneDumper *sdump, GF_Command *com)
{
	u32 i;
	GF_FieldInfo info;
	GF_CommandField *inf;
	if (!gf_list_count(com->command_fields)) return GF_OK;

	DUMP_IND(sdump);
	if (sdump->XMLDump) {
		gf_fprintf(sdump->trace, "<Replace extended=\"fields\" atNode=\"");
		scene_dump_vrml_id(sdump, com->node);
		gf_fprintf(sdump->trace, "\">\n");

		sdump->indent++;
		i=0;
		while ((inf = (GF_CommandField *) gf_list_enum(com->command_fields, &i))) {
			gf_node_get_field(com->node, inf->fieldIndex, &info);
			info.far_ptr = inf->field_ptr;

			DUMP_IND(sdump);
			if (gf_sg_vrml_get_sf_type(info.fieldType) != GF_SG_VRML_SFNODE) {
				gf_fprintf(sdump->trace, "<repField atField=\"%s\" ", info.name);
				gf_dump_vrml_simple_field(sdump, info, com->node);
				gf_fprintf(sdump->trace, "/>\n");
			} else {
				gf_fprintf(sdump->trace, "<repField>");
				gf_dump_vrml_field(sdump, com->node, info);
				gf_fprintf(sdump->trace, "</repField>\n");
			}
		}
		sdump->indent--;

		DUMP_IND(sdump);
		gf_fprintf(sdump->trace, "</Replace>\n");
	} else {
		gf_fprintf(sdump->trace, "MULTIPLEREPLACE ");
		scene_dump_vrml_id(sdump, com->node);
		gf_fprintf(sdump->trace, " {\n");
		sdump->indent++;
		i=0;
		while ((inf = (GF_CommandField *) gf_list_enum(com->command_fields, &i))) {
			gf_node_get_field(com->node, inf->fieldIndex, &info);
			info.far_ptr = inf->field_ptr;
			gf_dump_vrml_field(sdump, com->node, info);
		}
		sdump->indent--;
		DUMP_IND(sdump);
		gf_fprintf(sdump->trace, "}\n");
	}
	return GF_OK;
}