cancel
Showing results for 
Search instead for 
Did you mean: 

XML parsing

Former Member
0 Kudos

Hi Experts,

I am getting Fatal Error: com.sap.engine.lib.xml.parser.Parser.

This means that source file has invalid xml structure.

But i am able to see the incoming payload in the sxmb_moni.

When i will paste this info in test mapping, it is giving me the error that xml is not well formed.

XML version and encoding is as follows:

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

Please help me to understand this behavior of xml processing.

How can i handle this?

Thanking you in advance.

Piyush

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Piyush,

Download the XML from SXMb_MONI, save it as an XML file and try to open it in a browser. If you cannot open it in a broswer, take a look at the Entire XML content by opening the same using Notepad / text pad. Check if the XML is valid format , and also check if there is some junk data in the XML.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

I have checked with different encoding too but no luck

and

I have exported the xml file and verified that it is opening with IE.

Demo file:--->

Particular field which has problem

<Content> The e-mail system was unable to deliver the message, but did not report a specific reason. Check the address and try again. If it still fails, contact your system administrator.< Email Address # 5.0.0 X-Notes; &#12518; &#12540; &#12470; &#12540; Email Address &#12399; &#12487; &#12451; &#12524; &#12463; &#12488; &#12522; &#12398; &#12522; &#12473; &#12488; &#12395; &#12354; &#12426; &#12414; &#12379; &#12435; &#12290;> </Content>

Regards

Piyush

Message was edited by:

Piyush Gangwal

Former Member
0 Kudos

Hi Bhavesh,

XML file is opening in IE

but it's giving the error that xml is not in valid format when i tried to use the same file with the other xml tools.

I am wondering that how it is opening in sxmb_moni.

I dono what exactly the issue is?

Could you help me out to handle this?

Piyush

Former Member
0 Kudos

> Demo file:--->

> Particular field which has problem

>

> <Content> The e-mail system was unable to deliver

> the message, but did not report a specific reason.

> Check the address and try again. If it still fails,

> contact your system administrator.<b><u><</u></b> Email Address #

> 5.0.0 X-Notes; &#12518; &#12540; &#12470; &#12540;

> Email Address

> &#12399; &#12487; &#12451; &#12524; &#12463; &#12488;

> &#12522; &#12398; &#12522; &#12473; &#12488; &#12395;

> &#12354; &#12426; &#12414; &#12379; &#12435; &#12290;

> <b><u>></u></b> </Content>

>

Are the "<" and ">" characters correctly escaped?

Former Member
0 Kudos

Hi,

If it's possible try to close content inside Content element into CDATA (no parsing).

Regards,

Wojciech

Former Member
0 Kudos

Hi

< characters are properely escaped.

Thanks for the approach by CDATA.

I will get back to you guys,it's working or not.

Piyush

Answers (4)

Answers (4)

STALANKI
Active Contributor
0 Kudos

Piyush.

Are you pasting it in the message mapping or uploading the XML file into message mapping.

One way is to check the XML by removing nodes from the last and see if it is fine.Why cannot you generate a test file from the message mapping and process that XML?

Former Member
0 Kudos

Hi Sravya,

>>Are you pasting it in the message mapping or uploading the XML file into message mapping.

Pasting.

>>One way is to check the XML by removing nodes from the last and see if it is fine

I have deleted the nodes which have problem and rest xml fine.

>>Why cannot you generate a test file from the message mapping and process that XML?

Interface is running fine for the incoming xml which doesn't have those buggy characters.

If i put the value for the tag manually, then it adds CDATA tag automatically.

And mapping will be executed successfully.

I tried with XSLT mapping but it doestn't work out for partiular messages.

Do i need to put something in sender module or....

Please suggest the way by which i can make this thing work for all cases.

Piyush

Regards

Piyush

Former Member
0 Kudos

Hi Piyush,

Could you mail the XML to me? My email id is prashanth.azharuddin@wipro.com.

cheers,

Prashanth

P.S Please mark helpful answers

Former Member
0 Kudos

Hi Piyush,

Try a different encoding technique as already said. Maybe ISO-8859-1 or ISO-8859-16.

cheers,

Prashanth

Former Member
0 Kudos

Hi

In Design, test tab of mapping program, all possible encoding stadards has been checked.

But situation is still unchanged.

Please could you help me out to resolve this issue.

Thanks for helping me

Piyush

former_member192798
Active Contributor
0 Kudos

Hi Piyush,

I think this is parser error due to some invalid characters in the data. Try using different encoding like ISO-8859-1.

Check the encoding type in the adapter.

Regards.

Praveen

Message was edited by:

Praveen Kumar