Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Check if there are duplicate nodes

From: "Alex Krawarik[MSFT]" <alexkr@---------.--->
To: NULL
Date: 4/4/2006 2:00:00 PM

You could iterate through the nodes in the xml document and create a key - 
value pair by concat'ing the Seal and Number (the key), then try to add each 
XmlNode (the value) to a Hashtable or any structure that only allows unique 
keys. If the Hashtable throws, you have a duplicate.

The trickiest part of data validation isnt finding the duplicate, though, 
its trying to determine which one is actually the correct data if there is 
more than one! It might not be the first, or the second, or....

"Catalin Bucataru" <catalin.bucataru@g...> wrote in message 
news:uKz1feCWGHA.2064@T......
> Hello!
>
> I want to check if there are duplicate nodes in an xml document. The 
> document format is:
>
> <Containers>
> <Container Seal='' Number=''/>
> ...................................................
> </Containers>
>
> I want to check if there are duplicate containers, same seal and number. 
> This xml is created in a asp.net web page, and must be checked for 
> duplicates, before sending it to the sql server. The language used is c#.
>
> Can someone help me?
> Thanks!
>
> PS. I must mention that I know little about xsl, xslt ....
>
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent