Skip to Content
0
Aug 07, 2019 at 06:20 PM

XML Transformation Error An exception (CX_XSLT_FORMAT_ERROR) occurred

289 Views

Hi All,

I am trying simple XMl transformation to convert the following XML data to ABAP, this has attributes not like root and node.

<?xml version="1.0" encoding="UTF-8"?> <RPSL_PTNR address_1="1410 Street" address_2="" address_3="" address_4="" address_5="ADD5" antiboycott_ind="N" city="Pickering" ctry_code="CA" ctry_name="" decision="N" epci_ind="N" euembargo_ind="N" name_1="Power Tools Plus Inc" postal_code="L1W3R3" proscribed_ind="N" ptnr_id="1000016150" ptnr_type="VENDOR" request_url="" rpl_ind="N" state_code="ON" state_name="" sub_org="Z" unembargo_ind="N" usembargo_ind="N" user_varchar1="TEST1" user_varchar2="" user_varchar3=""/>

I tried following code:

TRY. CALL TRANSFORMATION id SOURCE XML i_cdata RESULT data = s_livinstondata OPTIONS value_handling = 'accept_data_loss'. CATCH cx_root INTO obj_exp. * v_etext = obj_exp->if_message~get_text( ). * http_error '500' 'Internal Server Error' v_etext. and Fm no Luck,

Do i Need to create a simple transformation if yes how, I can do with root and node but no luck in getting this one done.