Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / March 2007

Tip: Looking for answers? Try searching our database.

Compare two XML Files and save to One

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lewis76@gmail.com - 21 Mar 2007 06:57 GMT
Hi all,

I feel like this question has been asked before but I just cannot seem
to find a good answer.

Q: Is there a way to have two XML files and compare them and save them
to one.
    Example:

XML-A:
<Season>
<Fruit>Orange</Fruit>
<Fruit>Strawberry</Fruit>
</Season>
XML-B:
<Season>
<Fruit>Orange</Fruit>
<Fruit>Banana</Fruit>
</Season>

Output to XML-C would be:
<Season>
<Fruit>Orange</Fruit>
<Fruit>Strawberry</Fruit>
<Fruit>Banana</Fruit>
</Season>

I downloaded and installed the "XML Diff and Patch" Tool

http://msdn.microsoft.com/xml/xmldownloads

However, I don't think that is what I am looking for.  The
documentation seems to imply that I would be able to tell if their
Schemas are different but not actually save them to a different file.

Any help is appreciated.

Lewis
Bjoern Hoehrmann - 21 Mar 2007 07:33 GMT
* lewis76@gmail.com wrote in microsoft.public.dotnet.xml:
>Q: Is there a way to have two XML files and compare them and save them
>to one.

Could you explain what you mean by "compare" here? You example is
basically a merge of two documents; you could use XSLT to merge
them, other than that you'd have to write the code for it yourself
or pick a solution that does not ship with .NET. Then the most
obvious solution is probably XQuery.
Signature

Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.