How to open XML files in LibreOffice from the WHO ICTRP

The WHO provides a “Search Portal” for the International Clinical Trials Registry Platform at the following address:

Try it out! Do a search for “ixabepilone AND endometrial” for example. This will return a table of 4 clinical trials (or it did on 2016 Sept 21) with a red button at the top right that says “Export results to XML.” If you click this button (then “I agree,” then “Export all trials to XML”) your browser will save an XML file with the results in it.

Using LibreOffice to parse these data

LibreOffice Calc XML import
LibreOffice Calc XML import

LibreOffice has a great tool for importing XML information, like the sort you just downloaded from the WHO database.

Open LibreOffice Calc, then click on Data > XML Source …

But there’s a problem

If you navigate to where your browser saved the XML file and choose it as the “Source File,” you’ll have a problem. The “Map to Document” field won’t be populated by elements from the XML file as expected.

I reported the bug to the LibreOffice people, but in the meantime …

Here’s a workaround

Open up the XML file in a plain text editor (Notepad, Atom, Scratch, etc.).

The first line will look like this:

<?xml version=’1.0′ encoding=’UTF-8′ ?><Trials_downloaded_from_ICTRP>

Just change that line so that it looks like this:

<?xml version=”1.0″ encoding=”UTF-8″ ?><Trials_downloaded_from_ICTRP>

The only difference here is that the single quotes are replaced with double quotes. LibreOffice will read the file as expected now!

Click where it says “Trial” under “Trials_downloaded_from_ICTRP” in the “Map to Document” field, choose A1 as the “Mapped cell,” and click the Import button!

You can now read through WHO ICTRP files on LibreOffice Calc.

Published by

The Grey Literature

This is the personal blog of Benjamin Gregory Carlisle PhD. Queer; Academic; Queer academic. "I'm the research fairy, here to make your academic problems disappear!"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.