Bug 102337 - Data > XML Source ... does not read XML if the version number and encoding are specified with single quotes
Summary: Data > XML Source ... does not read XML if the version number and encoding ar...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2016-09-21 20:32 UTC by la .myrf.
Modified: 2017-09-28 14:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

XML file from WHO clinical trials registry (21.01 KB, text/xml)
2016-09-21 20:32 UTC, la .myrf.

Note You need to log in before you can comment on or make changes to this bug.
Description la .myrf. 2016-09-21 20:32:28 UTC
Created attachment 127530 [details]
XML file from WHO clinical trials registry

To reproduce error:

Data > XML Source ...

Select an XML file that begins with:

<?xml version='1.0' encoding='UTF-8' ?>

^ LibreOffice will not read a file that begins like this.

Change file to the following:

<?xml version="1.0" encoding="UTF-8" ?>

LibreOffice will read the file perfectly.

This is important because the WHO Clinical Trials registry automatically generates XML files of the first type, and need to be manually converted to the second. I have attached an example XML file to this bug report.

Here is the link to the WHO page where the XML file was generated:

Comment 1 Julien Nabet 2016-09-21 21:00:36 UTC
In xml file, there was this:
<?xml version='1.0' encoding='UTF-8" ?>
(with double quote at the end)

But even after replacing this one with simple quote, it doesn't open the XML file on pc Debian x86-64 with master sources updated today.
However, I don't have any error message, it just does nothing and "Import" button stays disabled.
Let's put this one to NEW.
Comment 2 la .myrf. 2016-09-21 22:07:08 UTC
Apologies, I must have uploaded the wrong version of the example file.

It works in LibreOffice with all double-quotes, and it doesn't if there are single quotes.
Comment 3 Aitor 2017-09-28 14:47:14 UTC
XML files generated from SAP J2EE contain single quotes too, and must be manually changed to import with Libreoffice.