private static XmlElement GetDataItemRow(XmlDocument document, int index, IDataItem param1, IDataItem result1) { var row = document.CreateElement("dataitem"); row.SetAttribute("index", index.ToString()); AppendElement(row, (param1.ToXmlElement(document, "param1"))); AppendElement(row, (result1.ToXmlElement(document, "result1"))); return(row); }