Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Check if there are duplicate nodes [Thread Next] Re: Check if there are duplicate nodesTo: 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 .... > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
