SIGN UP MEMBER LOGIN:    
ARTICLE

Compare Two XML Files Using .Net

Posted by Vasanth Articles | XML in C# March 24, 2010
In this tool, we Validate the schema and compare the data's of two XML files.
Reader Level:
Download Files:
 

Introduction:

Many cases we need to validate staging and production data. Mostly the client have send only XML files(production) and we have to validate our end output(staging).In this tool, we Validate the schema and compare the datas.

How to start?
  1. Change the config settings ( refer app.config in the attachment ).
  2. Set any primarykey is avail for each element ( in app.config - if new create one appsettings , its automatically get from the process)
  3. Finally the log will bind into the server.( refer errorpath and find out the result )
  4. Initially its validated Schemas.
  5. Once schema validated, compare both datas are equal.
  6. This process will done by using dataset.
Primary Key:

Uniquekey is used to map two files.So You have to add elements in app.config file dynamically based on your requirements.

<appSettings>
<add key="TECH" value="ID"/>
<add key="Positions" value="PID"/>
</appSettings>

Here "key" refers table name and "value" as column name.

Conclusion:

Through dataset we validated and compare the xmlfiles.Its more powerful to validate easily from XML to dataset. In code comments we ellobrate all the functionlity levels clearly.

Login to add your contents and source code to this article
share this article :
post comment
 

i was not able to download this file.. i need it this file . please help me

Posted by Muthu Kumar Mar 19, 2012

The Codes.ZIP file is not available and it is not able to download. Can you upload the file?

Posted by sridhar S Aug 26, 2011

Could not download files.

Posted by Azhar Malik Feb 23, 2011

hey, i really need this code (compare between 2 xmls) in urgent but i cannot download the files, when im trying download it im getting: "The page cannot be found" can i get a correct download link pls?

Posted by a t Feb 07, 2011

these files are not download.why do u keep so....

Posted by ajit pandey Jan 26, 2011
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Become a Sponsor