Hello Experts,
i have a problem with nodes from a xml file.
I have some <eventitem> nodes and want to loop every item in a variable, but i only get the first one...
<events>Liste</events>
<eventitem>Mitgliederversammlung</eventitem>
<eventitem>Sechzig Jahre</eventitem>
//SEMINARSELEKTION workshopstring = node["eventitem"].InnerText; if (workshopstring.Contains("Tag")) { TDMRTeilnahme = true; TDMRTeilnahme1.Set(executionContext, TDMRTeilnahme); tracingService.Trace("TDMRTeilnahme zugeordnet"); } else if (workshopstring.Contains("Masch")) { tedx = true; TedX.Set(executionContext, tedx); tracingService.Trace("Teilnahme"); } else { QueryExpression workshopquery = new QueryExpression("mrd_seminar"); workshopquery.ColumnSet = new ColumnSet(true); workshopquery.Criteria.AddCondition("mrd_name", ConditionOperator.Equal, workshopstring); // query ausführen EntityCollection retrieveworkshop = service.RetrieveMultiple(workshopquery); if (retrieveworkshop.Entities.Count == 1) { Entity Workshop1 = retrieveworkshop.Entities[0]; Entity Workshop2 = retrieveworkshop.Entities[0]; Entity Workshop3 = retrieveworkshop.Entities[0]; Entity Workshop4 = retrieveworkshop.Entities[0]; if (Workshop1 != null) { WorkshopA.Set(executionContext, new EntityReference("mrd_seminar", Workshop1.Id)); tracingService.Trace("Workshop zugeordnet ", Workshop1.ToString()); } else if (Workshop2 != null) { WorkshopA.Set(executionContext, new EntityReference("mrd_seminar", Workshop2.Id)); tracingService.Trace("Workshop zugeordnet ", Workshop2.ToString()); } else if (Workshop3 != null) { WorkshopA.Set(executionContext, new EntityReference("mrd_seminar", Workshop3.Id)); tracingService.Trace("Workshop zugeordnet ", Workshop3.ToString()); } else if (Workshop4 != null) { WorkshopA.Set(executionContext, new EntityReference("mrd_seminar", Workshop4.Id)); tracingService.Trace("Workshop zugeordnet ", Workshop4.ToString()); } } } //Variable clearen tracingService.Trace(workshopstring); workshopstring = null; return; //ENDE SEMINARVERGABE
Kind Regards
Léon
*This post is locked for comments