私は xmlString
を書いていますが、2 つの異なるものを渡しています。XML の書き込みを続行するには、のアイテムがLists
必要です。Loop
List
public class Results
{
public List<Guid> itemGuid { get; set; }
public List<string> storagePath { get; set; }
public int userId {get; set;}
}
public void CreateOutput(string inFile, string storagePath, int userId)
{
Results results = GetfileInfo(inFile, storagePath);for each of the pages
CheckinXml(results.itemGuid, results.storagePath , userId); //
}
public string CheckinXml(List<Guid> itemGuid, List<string> storagePath, int userId)
{
XDocument xdoc = new XDocument();
xdoc = new XDocument(
new XElement("MyList",
new XElement("Record",
new XElement("ID", itemGuid),
new XElement("StoragePath", storagePath),
new XElement("UploadedUserID", userId)
)
)
);
string result = xdoc.ToString();
return result;
}
現在、itemGuid のリストと storage Path のリスト内のすべての項目が 1 つの文字列に格納されています。私の現在のケースでは、返された 3 つの XML 文字列が必要です。リストをループする for ループに XML を配置する必要がありますか?