I have the below classes:
public class MainRequest
{
private Request _dataField;
[XmlElementAttribute(\"Parameters\")]
public Request Parameters
Through experimentation, you'll have to rename Batch
to BatchEntry
(apparently you cannot combine XmlElement
and XmlArrayItem
) and then you can you the XmlArrayItem
attribute with a name of "ParameterEntry".
This will work:
/* No idea why this a 2-d array... It doesn't match your XML */
[XmlArrayItem("ParameterEntry")]
public Field[] BatchEntry //was Batch