# Compare two XML files

**URL:** <https://community.cdata.com/t/compare-two-xml-files/694>\
**Category:** CData Arc\
**Tags:** question\
**Created:** [April 15, 2024, 11:25am UTC](https://community.cdata.com/t/compare-two-xml-files/694 "2024-04-15T11:25:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![russell-jerseypost](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@russell-jerseypost](https://community.cdata.com/u/russell-jerseypost)\
**Post date:** [April 15, 2024, 11:25am UTC](https://community.cdata.com/t/compare-two-xml-files/694/1 "2024-04-15T11:25:33Z")

</div>

Hi

I would like to compare two XML files for differences.

Here’s my use case.

I create an order via an API and can get the entire order back in the response.

I will store that order in a database table.

Later, I will poll the API again and fetch the latest details of that order.

I can do a quick check for overall changes using a hash, but I will need to know what changes if they latest and stored order differ.

thanks in advance

---

<div class="post-metadata">

**Author:** ![James\_B](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/james_b/32/1688_2.png) [@James\_B](https://community.cdata.com/u/James_B)\
**Post date:** [April 15, 2024, 9:17pm UTC](https://community.cdata.com/t/compare-two-xml-files/694/2 "2024-04-15T21:17:47Z")

</div>

Unfortunately, CData Arc does not offer a feature for file comparison. The application is designed to process single and batch messages, but there is nothing that in the model that would make it possible to compare a file against an earlier copy of itself.

It may be possible to create a script that would perform this, or call out to a batch process that would run the comparison - or if you eventually sync this data into a database, a better option might be to enable database triggers that track changes to the records - but unfortunately there is nothing that would compare to file comparison features in data reader utilities like Visual Studio Code, Notepad++ or Ultraedit.

---

<div class="post-metadata">

**Author:** ![russell-jerseypost](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@russell-jerseypost](https://community.cdata.com/u/russell-jerseypost)\
**Post date:** [April 16, 2024, 2:30pm UTC](https://community.cdata.com/t/compare-two-xml-files/694/3 "2024-04-16T14:30:37Z")

</div>

thanks, I might consider building this functionality into an external REST API that I can call from cData Arc.

The previous version of the file would indeed be stored in a DB.
