由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - How to compare data in an Array and in Xml
相关主题
[转载] 申请.NET 版SOAP
.NET 入门系列(2)--Web Services,XML,SOAPcontrol array in .net
using weather XML feed in C# - 1一个xml的问题。
using weather XML feed in C# - 2Mutually exclusive attributes
diffGram Re: using weather XML feedhexadecimal value 0x00, is an invalid ch
screebshot: winform based weather appASP help
web service Re: .NET 入门系列(1)--什么是.NET求助:关于online editor。
WSDL选择VB.NET还是 C#?
相关话题的讨论汇总
话题: xml话题: list话题: array话题: compare话题: items
进入DotNet版参与讨论
1 (共1页)
i****a
发帖数: 36252
1
I am coding in C# .NET 3.5
Let's say I have a List, and an XML file with list if items.
What I want to do is compare the values of the two lists, and get the
difference.
I want two results, 1. items in List but not in XML, 2. items in XML but
not in List.
I can only think of looping through the List against XML, and another loop
for XML against the List.
Is there another way to do this quicker?
Also, I've been using Xml.Ling to process the XML on other parts of the
program and wonder if Ling offers anything I can use for this.
s***o
发帖数: 2191
2
maybe you can use Enumerable.Except method. for more details, check:
http://msdn.microsoft.com/en-us/library/bb300779.aspx

【在 i****a 的大作中提到】
: I am coding in C# .NET 3.5
: Let's say I have a List, and an XML file with list if items.
: What I want to do is compare the values of the two lists, and get the
: difference.
: I want two results, 1. items in List but not in XML, 2. items in XML but
: not in List.
: I can only think of looping through the List against XML, and another loop
: for XML against the List.
: Is there another way to do this quicker?
: Also, I've been using Xml.Ling to process the XML on other parts of the

i****a
发帖数: 36252
3
alright thanks

【在 s***o 的大作中提到】
: maybe you can use Enumerable.Except method. for more details, check:
: http://msdn.microsoft.com/en-us/library/bb300779.aspx

1 (共1页)
进入DotNet版参与讨论
相关主题
选择VB.NET还是 C#?diffGram Re: using weather XML feed
怎么LOOP所有帖子screebshot: winform based weather app
请问:关于C#和XML的问题web service Re: .NET 入门系列(1)--什么是.NET
C#.Net Funsdamentals (5)WSDL
[转载] 申请.NET 版SOAP
.NET 入门系列(2)--Web Services,XML,SOAPcontrol array in .net
using weather XML feed in C# - 1一个xml的问题。
using weather XML feed in C# - 2Mutually exclusive attributes
相关话题的讨论汇总
话题: xml话题: list话题: array话题: compare话题: items