Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7766601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:27:45+00:00 2026-06-01T15:27:45+00:00

I have two XML files. The structure of both XML files is as below:

  • 0

I have two XML files. The structure of both XML files is as below:

<file1>
       <table>
              <name>...</name>
              <columns>
                       <col>
                             <name>...</name>
                             <type>...</type>
                             <fkey>...</fkey>
                       </col>
                       <col>
                             <name>...</name>
                             <type>...</type>
                             <fkey>...</fley>
                       </col>
               <columns>
       </table>
      <table>
              <name>...</name>
              <columns>
                       <col>
                             <name>...</name>
                             <type>...</type>
                             <fkey>...</fkey>
                       </col>
                       <col>
                             <name>...</name>
                             <type>...</type>
                             <fkey>...</fley>
                       </col>
               <columns>
       </table>
 </file1>

Both the XML files will have same tables, but the number of columns can differ. What I am trying to do is compare each column of each table and find the difference(if any) in type and fkey. Also I would like to know which columns are missing from second XML file. And I want to save this info to another file(it can be any format).

I know Perl,PHP and JavaScript but I haven’t worked with XML before.

Now what I want to know is where to start and which tools to use? What would be the best way to do above task? Is there any module which provide functions to perform diff between two XML files?

EDIT: I am working on Linux platform(RedHat).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:27:46+00:00Added an answer on June 1, 2026 at 3:27 pm

    For a Perl solution take a look at the related CPAN modules. XML::Diff is the most obvious and seems to do what you need, but there are several to try if that doesn’t work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it a bad thing to have two xml columns in one table? +
I have two files file a.) xmlFile.xml b.) emails.txt xmlFile.xml has the following structure
I have two XML files that are generated by another application I have no
Suppose I have two XML files. First XML File: <?xml version=1.0?> <AccessRequest xml:lang=en-US> <AccessLicenseNumber>Your_License</AccessLicenseNumber>
I am have two xml files.. I first get one and loop through it
this is my situation: I have two org.w3c.dom.Document created from two xml files. What
I have two major xml elements: courses and CRNs <courses> <course credits=3 courseNum=COMP1950 name=Intermediate
I have a directory of very large XML files with a structure as this:
I have two xml files, defect. xml and employee.xml. But the files havea common
I have to compare XML data. There are two sources- Web Service XML files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.