E
E
e1s2015-10-29 09:10:21
C++ / C#
e1s, 2015-10-29 09:10:21

How to implement storage of equivalent elements in xml?

I want to make a configuration file for an application in c#, and store the property name, method name, and an array of passed parameters in it. But the problem is that different methods have a different number of parameters, and I don’t want, for example, to create many attributes of the form value1, value2, etc., since then it will be problematic to parse all this, but writing parameters into one attribute is also not the case, how best to proceed in this situation?
For example

<Param property= "name" method = "name" value1="value" value2="value" ></Param>
<Param property= "name" method = "name" value1="value"></Param>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
V Sh., 2015-10-29
@JuniorNoobie

<property id="id1">
     <params>...</params>
     <values>
          <value id="value1">1</value>
          <value id="value2">2</value>
     </values>
</property>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question