Question
TECHMAHINDRA
IN
Last activity: 30 Dec 2019 5:26 EST
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