Hi all
This error has been handled with a lot, but always concerns CSV. I am dealing with simple XML. I am writing a Perl script that first generates a XML file, and then imports it into a BaseX database. Unfortunately, I get the error message:
"." (Line 1): Content is not allowed in prolog. At /BaseXClient.pm line 126
I have tried many things and have been debugging with perl, but as far as I can see the created files are valid XML. The error implies that a connection to the BaseX server is established. Something's wrong with the XML file but I do not know what and how to prevent it. I added the script on pastebin as to not waste space in this email. [1]
The XML is created in the sub createXml. That routine returns the path to the created file, which on line 24 is imported into BaseX. Or at least, that is the goal. But that's where the error occurs. I attached example XML output. The script as well as the output and input are in UTF8.
Thank you in advance
Kind regards
Bram Vanroy