Question

2
Replies
636
Views
Close popover
PRAVEEN KUMAR MORE (Praveen_More)
TECHMAHINDRA
SENIOR SOFTWARE ENGINEER
TECHMAHINDRA
IN
Praveen_More Member since 2014 8 posts
TECHMAHINDRA
Posted: December 19, 2019
Last activity: December 30, 2019
Closed

Failed to parse XML. Error : Content is not allowed to prolog.

Hi,

We have a requirement where we are uploading the XML file via button (used file path control) and save the XML data in DB tables.

Steps I followed:

1. created Parse-XML rule with the same structure of XML file.

2. created activity and calling Apply-Parse-XML method to parse the XML.

3. Do the data mapping once the XML data is parsed on the clipboard.

4. do obj-save.

Below is the sample XML uploaded -

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

<manuals>

<manual>

<TaskInformation>

<TaskName>

<contents_id>value1</contents_id>

<contents_value>value1</contents_value>

</TaskName>

<StartPeriod>

<contents_value>value1</contents_value>

</StartPeriod>

<EndPeriod>

<contents_value>value1</contents_value>

</EndPeriod>

</TaskInformation>

</manual>

</manuals>

At the Apply-Parse-XML step I am getting the exception as "Failed to parse XML. Error : Content is not allowed to prolog."

Can anyone help how to solve this exception ?

Thanks,

Praveen

Pega Platform Low-Code App Development Data Integration
Moderation Team has archived post