How compare two omnioutliner documents Mac

How do I compare two documents. I have messed up a document, due to copies created when using iOS then sandboxed in an Omnioutliner folder, not in the original Folder.

How to remedy this?
a) comparing documents
b) avoiding future mess

Assuming that you’re concerned about text rather than formatting…

On a mac, I would export the two documents to a text-type doc of some sort (e.g. tabbed text, OPML) and then compare them in a ‘diff’ app (Kaleidoscope) or one with such capabilities (BBEdit) or if I had no alternatives, the commandline ‘diff’.

I don’t really use the ios app so I don’t have any advice on avoidance.