sagark1201 Absent Member.
Absent Member.
976 views

Error on line 1: Content is not allowed in prolog, getting this error while trying to read any xml

I am getting this error while trying to read any XML file using any XML file, tried many changes in the XML but still not successful, is there anything else I need to take care in HPOO settings??

Labels (1)
0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Error on line 1: Content is not allowed in prolog, getting this error while trying to read any x

Hi,

Usually this error is caused by having incorrect xml start. The xml file should always start with the <xml> tag and should have no linebrakes, spaces or any other character before it. Check for linebrakes or invisible characters before the xml tag.

If that doesn't help you and it is possible post a sample xml you are having trouble with and we will try to investigate further.

Regards,

Vlad

0 Likes
scuda20 Super Contributor.
Super Contributor.

Re: Error on line 1: Content is not allowed in prolog, getting this error while trying to read any x

As Vlad said you most likely have some characters you can't readily see. I read in my xml file and then have an output with filters that strip everything before <compute> (my starting tag). This solves the exact problem you are seeing.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.