Skip to Content
0
Former Member
Jun 17, 2009 at 03:47 PM

Read XML from a String

37 Views

Hi, I have called a Web Service that return an XML Sting. This is the abap code:


REPORT  zprova_proxy line-SIZE 1000.

DATA: proxy TYPE REF TO zco_service1soap.
DATA: intab  TYPE zget_dati_vestiariosoap_in.
DATA: output TYPE zget_dati_vestiariosoap_out.
DATA : sys_fault TYPE REF TO cx_ai_system_fault.


CREATE OBJECT proxy
  EXPORTING
    logical_port_name = 'PORTA'.
IF sy-subrc EQ 0.
  TRY.
      CALL METHOD proxy->get_dati_vestiario
        EXPORTING
          input  = intab
        IMPORTING
          output = output.
    CATCH cx_ai_system_fault .
      CREATE OBJECT sys_fault.
      WRITE :/ 'error at level 1', sys_fault->errortext.
      EXIT.
    CATCH cx_ai_application_fault .
  ENDTRY.



ENDIF.


WRITE /: output-get_dati_vestiarioresult.

When I write the output field I have an XML String.

Now I want to access XML tags "<elenco></elenco>" of my String and fill an internal table. How can I do it?

Help me please. THANKS

Edited by: Andrea Ruocco on Jun 17, 2009 5:51 PM

Edited by: Andrea Ruocco on Jun 17, 2009 5:53 PM