【发布时间】:2021-08-13 02:32:07
【问题描述】:
我有以下代码,需要删除重复的 Id 并将结果作为字符串返回?
scheduledCustomerJourneysXml 是一个包含以下 xml 的字符串变量:
XDocument doc = XDocument.Parse(scheduledCustomerJourneysXml);
<ScheduledCustomerJourneys>
<ScheduledCustomerJourney ScheduledCustomerJourneyId="534454" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="534455" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="534455" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="538020" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="538020" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="538020" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="538020" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="531228" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="534457" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="526977" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="526978" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="538023" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="534459" />
<ScheduledCustomerJourney ScheduledCustomerJourneyId="534459" />
</ScheduledCustomerJourneys>
【问题讨论】:
-
到目前为止你尝试了什么?