function saveParameters(id, value)
% function saveParameters(id, value)

fid = fopen('rtcParameterConfig.xml','wt');

% header
fprintf(fid,'<?xml version="1.0" encoding="UTF-8"?>\n');
fprintf(fid,'<treeVectorFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.openda.org" xsi:schemaLocation="http://www.openda.org ../../xsd/treeVector.xsd">\n');
fprintf(fid,'  <treeVector>\n');

for i=1:length(id),
    fprintf(fid,'    <treeVectorLeaf id="%s">\n',id{i});
	fprintf(fid,'      <vector>%f</vector>\n',value(i));
    fprintf(fid,'    </treeVectorLeaf>\n');
end

fprintf(fid,'  </treeVector>\n');
fprintf(fid,'</treeVectorFile>\n');

fclose(fid);