cancel
Showing results for 
Search instead for 
Did you mean: 

String To XML

manigram
Active Participant
0 Kudos


HI,

Facing a issue while converting String in to XML structure in java mapping.

Ex : TDLINE>,,<B>LI/EXECUTION</></TDLINE> 

During the execution it is failing due to there is no proper close tag for B element.

Is there any way to handle this.

Regards,

Manigadnan

Accepted Solutions (1)

Accepted Solutions (1)

xavisanse
Active Participant
0 Kudos

you should put your "xml" between <![CDATA[   and ]]>

For example, in your case:


<TDLINE><![CDATA[ ,,<B>LI/EXECUTION</>]]></TDLINE>


Regards, Xavi

manigram
Active Participant
0 Kudos

HI ,

My xml is in CDATA only but i have to convert it into XML.

Regards,

Manigandan

azharshaikh
Active Contributor
0 Kudos

Hi,

Seems the CDATA is not having correct XML format...you can add the missing tag from your Java code to make the XML well formed one..

Is this happening for single XML message or randomly? You can ask the Sender to send correct format XML in CDATA...

Regards,

Azhar

Answers (3)

Answers (3)

RaghuVamseedhar
Active Contributor
0 Kudos

Please download the XML from Moni, before mapping step. Post the XML here, so we can help you.

iaki_vila
Active Contributor
0 Kudos

Hi Manigandan,

You are answering yourself, you need to change your code to avoid a wrong XML structure, depending how you are generating the XML you have to prepare a correct xml tags in the string before to generate the XML.

Regards.

former_member191435
Contributor
0 Kudos

can you please show your code where you  are using this one...