Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Binary to XML

AswinKumar
Associate
Associate
0 Kudos
3,325

Hello,

I have an android manifest file which is in binary. I want to convert this to XML or string. I need to get some data from this file.

I did this but still the value is not in a readable format. If required i can attach the that file.

/doc/cl_as_document_utils=>convert_bintab_to_xstring(

   exporting

     it_binary_tab = lt_content

     i_binary_size = lv_filelength

   receiving

     r_xdata       = ev_xstring

).

lv_string = /doc/cl_as_document_utils=>convert_xstring_to_string( i_xdata = ev_xstring ).

Thanks & regards,

Aswin


6 REPLIES 6

hendrik_brandes
Contributor
968

Hello Aswin,

Try this:

data:

  l_xstring   type xstring,

  l_xml       type string.

      CALL TRANSFORMATION id
        SOURCE XML l_xstring
        RESULT XML     l_xml.

    cl_uxs_xml_services=>show(
         id_string   = l_xml
    ).

Kind regards,

Hendrik

0 Kudos
968

Hi Hendrick,

The normal transformation din't work. Because it is not in direct XML. It is in binary xml format.

Regards,

Aswin

0 Kudos
968

Hello Aswin,

sure. But the CALL TRANSFORMATION is able to transform even a xstring-XML.

The question is: How do you import your manifest-XML?

Kind regards,

Hendrik

0 Kudos
968

Hi,

The file will be uploaded from UI and it will be in binary format.

From binary i am trying to convert it to Xstring and from there to either XML or String in a readable format.

Regards,

Aswin

Former Member
0 Kudos
968

Try these FM's:

SCMS_BINARY_TO_XSTRING

SCMS_BINARY_TO_STRING

Regards,

Felipe

0 Kudos
968

Hi Felipe,

As i said earlier it is not a straight forward conversion. I tried all these things already and it din't work out. This Manifest file is a Binary XML file.

Regards,

Aswin