Dynamic number of parameter to save to the host and to get them

Hello everybody, I try to change setStateInformation and getStateInformation such that I want to get variable number of parameters in the host . For example These parameters consist of variable number of points and lines for automation. I think that I need to read the number of parameters from getStateInformation (xml files ) first and then depending on that number, I will get for example x and y coordinates value of each points. Is there any way to deal with this? Any forum of discussion link would be greatly appreciated. Thanks in advance

You can create all possible XML structures with the JUCE XML classes. You could create a list of child XML Elements that have their own attributes and add them to a parent node: