XML Import/Export

Top  Previous  Next

Advanced > Exporting > XML Import/Export

This allows you to export clips to an XML file (a text file with special mark-up tokens, similar to HTML) and then re-import them into another database, or the same database at another time.  Clips are reproduced completely, along with all attributes such as the capture date, source URL, title, and all included data formats.

Accessing the Dialog - You can access the XML Import/Export dialog from the File menu, or you can also add buttons to the main toolbar.   If you are exporting, you need to first select the clips that will be exported.  Use of virtual collections such as "today" or "since last import" is very useful here. Also, you can use the "show all clips in all children" command from the collection tree.

Clip Centric - You only need to worry about exporting the clips themselves, and ClipMate will include enough information in the XML file to re-create the collection which the clip resided in.  This allows you to export "cross sections" of the database without worrying about the collections.  For example, you can export the result of a search, which may span several collections.  ClipMate will include all collections involved with those clips, in the export file.

Encoding - If you look at the resulting XML, you will notice that some of the data is not readable.  Any characters that may invalidate the XML are encoded using the "URL Encoding" standard RFC1738.  Any data type other than plain text, such as Bitmaps are encoded with Base64 encoding RFC 1521 (the MIME standard).

Uniqueness - In order to synchronize data, ClipMate needs a way to uniquely identify each clip. Prior versions of ClipMate used an ID scheme that uniquely identified each clip within the database, but this won't work from one database to another. So starting with v7.1, each clip is assigned a unique ID that can be used to identify it anywhere in the world.  By using Globally Unique Identifier (GUID), each clip is indeed unique, for all practical purposes.  This allows synchronization of data without duplication.  For further reading, you can learn more about GUIDs on WikiPedia.

When ClipMate 7.1 (or later) opens an older database for the first time, it assigns new IDs to all clips and collections.  This allows the import/export to work, but does not solve the uniqueness problem for clips that may have already been replicated into other databases, using other methods. So the unique ID is useful only for future replications, and doesn't help you reconcile clips that may have already been copied (through database copying) to other computers.

Duplicate Items - Suppose you are importing 100 clips, and 50 of them already reside in your database.  Normally, it's ok to overwrite the existing ones, if the new ones are exactly the same. But what if you've edited some of them?  Here is where the mis-match handling comes in, enabled by the unique IDs.

During the import process, ClipMate examines each clip to see if the same unique ID already exists in this database. If so, then it checks to see if there are any significant differences between the existing and new (imported) clip, such as the text being different. If there is a difference, the import will pause and ask if you want to keep the old clip or use the new clip. You can use the "use same answer for all" option to apply your decision to all subsequent mis-matches.

Trash/Overflow Items - If you import a clip that is already in the database, but it's in the trashcan or overflow, then the above "duplicate" logic is skipped, and the old clip is deleted from the database and replaced.  This prevents imported clips from immediately winding up in the trash or overflow.

Sync by Date - Each time you run the import or export, ClipMate keeps track of the date/time. This timestamp can be used by two special new virtual collections called "since last export" and "since last import".  These virtual collections allow you to quickly select all clips that are new (or changed) since the last time you ran the import or export, respectively.  The "since last import" is EXTREMELY USEFUL and should be your primary method of selecting clips to "sync" between databases.  You can manually alter these dates with the "advanced" button on the import/export dialog.

Updates via RSS / ClipFeeding - We've enhanced our automatic update/news checking so that you can "subscribe" to XML files that other users have "published".  If you subscribe to a ClipMate XML "Clip Feed", then you'll receive notices on the ClipMate Update screen, and you can download the XML file and install it in just a couple of clicks.

Typical Scenarios

Scenario 1:  Work/Home - Tom likes to keep the same clips at work and home. When he arrives at work in the morning, he imports his XML file that he brought with him. This sets the internal "date of last import" to today at 8:00.  AT the end of the day, he has 30 new clips, spread across 5 collections.  He runs the "since last import" virtual query, which retrieves all 30 clips. Then he selects all of the clips in the ClipList, and runs the export, writing to a new file, located on his USB stick.  He takes that file home, imports there, works for several hours and then runs the "since last import" virtual query, selects all clips, exports to a new file on the USB stick. Tomorrow morning, the cycle repeats.

Scenario 2: Friend's House - Patrick visits George, who also uses ClipMate.  Patrick needs to do some work on George's computer, and ends up accumulating a bunch of clips that he needs at home.  He uses the "today" virtual collection to select all of today's clips, exports them to a file, and then e-mails it to himself as an attachment.

Scenario 3: Joke List - Colin has a great collection of jokes that he shares with his friends who also use ClipMate.  Once a week or so, he runs the "since last export" virtual query to find all clips since he last sent an XML file.  He's got 30 new jokes, but there are actually a LOT more clips, since there are various odds and ends in the Inbox. But he clicks on the second column of the ClipList to sort the results by "collection", so all of the jokes sort together.  Now he selects the range of 30 clips that he wants to export, exports to the new XML file, and e-mails that to his friends. They now import his new jokes.

Scenario 4: Syndication - Dr. Bob publishes "Dr. Bob's List of Remedies For What Ails Ya" to other doctors who use his excellent boilerplate text to complete patient care sheets.  He has a monthly update, sent to his customers via e-mail.  His customers all use ClipMate because it lets them quickly complete the forms via quickpaste or drag 'n' drop. Since each clip is tagged with a globally unique ID, Dr. Bob can not only send new clips, but can send updates to existing clips, as needed due to changing laws and insurance requirements.  For security reasons, Dr. Bob encrypts the XML file with WinZip 10, using 256-bit AES encryption.  Only current customers receive the unlock code.