I have an XML input as follows-
<?xml version="1.0"?>
-<INPUT>
<V0>10.0000</V0>
<V1>20.0000</V1>
<V2>30.0000</V2>
<V3>:0.0000</V3>
<V4>30.0000</V4>
<V5>0.0000</V5>
<V6>0.0000</V6>
<V7>0.0000</V7>
<V8>0.0000</V8>
<V9>0.0000</V9>
<V10>0.0000</V10>
<V11>50.0000</V11>
<V12>20.0000</V12>
<V13>60.0000</V13>
<V14>30.0000</V14>
<V15>0.0000</V15>
<V16>1.0000</V16>
-</INPUT>
I want to serialize it to an object for the following C# class structure-
class Input
{
List<V> variables;
}
So I want to create a list for the XML elements which has pattern V[0-9]+ (e.g V0, V1, V2 and so on). The list is an ordered list to preserve the index of the variable elements. Just to mention if we can successfully serialize the mentioned XML as expected then the object should have a list of 16 items(since there are 16 XML elements with pattern V[0-9]+). The actual XML input has few hundreds variable elements.