cancel
Showing results for 
Search instead for 
Did you mean: 

XML to CSV converter issue !

10-31-2022 8:59 AM
das_sappo Participant
2180 views 7 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

I am not able to convert the below xml through XML-CSV Converter , while simulation nothing is populating in message body and also not able to capture field value via Xpath in Content Modifier

Source XML

<?xml version="1.0" encoding="utf-8"?>
<MT_CO_SendConfirmation xmlns="http://YBS.com/CO/SendConfirmation">
  <Records>
    <ID>765432</ID>
    <Date>17-08-2022<Date>
    <Amount>250000</Amount>
    <InvoiceNumber>EINV001</InvoiceNumber>
 </Records>
</MT_CO_SendConfirmation>

Converter

Namespace Mapping:

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor
0 Likes

Hello Arvik,

Please write a XSLT and remove the namespace or you need to have proper namespace in both runtime configuration( remove double quotes ) and Input XML ( like xmlns:K0="http://YBS.com/CO/SendConfirmation" ).

Also with respect your data please add closing tag for Date element and then whole setup works.Below setup works

Input XML:

<?xml version="1.0" encoding="utf-8"?>
<MT_CO_SendConfirmation xmlns:KO="http://YBS.com/CO/SendConfirmation">
  <Records>
    <ID>765432</ID>
    <Date>17-08-2022</Date>
    <Amount>250000</Amount>
    <InvoiceNumber>EINV001</InvoiceNumber>
 </Records>
</MT_CO_SendConfirmation>

Converter and Namespace mapping:

Regards,

Sriprasad Shivaram Bhat

das_sappo
Participant
0 Likes

Thanks Sriprasad .

Converter working but during simulation I am not able to capture the value via xpath

philippeaddor
Active Participant
0 Likes

Hi Arvik,

Look at your Data Type. It should be java.lang.String!

Philippe

Answers (2)

Answers (2)

GoranKovacic
Participant
0 Likes

Hi Arvik,

it seems like your xml specifies a namespace - this is just my assumption though, because as Aditya already said your posted xml is incomplete.

I recall that a lot of times when we are doing with namespaces, they cause a couple of unpleasant surprises. That is why I would suggest to either try omitting / removing it from the xml itself or adding it as namespace of the Iflow itself.
In our cases the latest proved always as especially useful.

Best regards,
Goran

AdityaMani51
Participant
0 Likes

Hi Arvik,

This xml is not valid, Please provide complete xml.

You can validate your xml online also -https://www.liquid-technologies.com/online-xml-validator

Regards,
Aditya

das_sappo
Participant
0 Likes

Hi Morten/Aditya/Goran,

I have updated the input XML but, still not able to Capture.