fix stupid xml, close #247

This commit is contained in:
larshp 2016-06-08 09:50:54 +00:00
parent 75a192a1cf
commit 157bd8407c

View File

@ -22232,15 +22232,24 @@ CLASS lcl_persistence_user IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD from_xml. METHOD from_xml.
DATA: lv_xml TYPE string.
lv_xml = iv_xml.
* fix downward compatibility
REPLACE ALL OCCURRENCES OF '<_--28C_TYPE_USER_--29>' IN lv_xml WITH '<USER>'.
REPLACE ALL OCCURRENCES OF '</_--28C_TYPE_USER_--29>' IN lv_xml WITH '</USER>'.
CALL TRANSFORMATION id CALL TRANSFORMATION id
OPTIONS value_handling = 'accept_data_loss' OPTIONS value_handling = 'accept_data_loss'
SOURCE XML iv_xml SOURCE XML lv_xml
RESULT (c_type_user) = rs_user ##NO_TEXT. RESULT user = rs_user ##NO_TEXT.
ENDMETHOD. ENDMETHOD.
METHOD to_xml. METHOD to_xml.
CALL TRANSFORMATION id CALL TRANSFORMATION id
SOURCE (c_type_user) = is_user SOURCE user = is_user
RESULT XML rv_xml. RESULT XML rv_xml.
ENDMETHOD. ENDMETHOD.
@ -22609,10 +22618,19 @@ CLASS lcl_persistence_repo IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD from_xml. METHOD from_xml.
DATA: lv_xml TYPE string.
lv_xml = iv_repo_xml_string.
* fix downward compatibility
REPLACE ALL OCCURRENCES OF '<_--28C_TYPE_REPO_--29>' IN lv_xml WITH '<REPO>'.
REPLACE ALL OCCURRENCES OF '</_--28C_TYPE_REPO_--29>' IN lv_xml WITH '</REPO>'.
CALL TRANSFORMATION id CALL TRANSFORMATION id
OPTIONS value_handling = 'accept_data_loss' OPTIONS value_handling = 'accept_data_loss'
SOURCE XML iv_repo_xml_string SOURCE XML lv_xml
RESULT (c_type_repo) = rs_repo ##NO_TEXT. RESULT repo = rs_repo ##NO_TEXT.
IF rs_repo IS INITIAL. IF rs_repo IS INITIAL.
_raise 'Inconsistent repo metadata'. _raise 'Inconsistent repo metadata'.
@ -22632,7 +22650,7 @@ CLASS lcl_persistence_repo IMPLEMENTATION.
MOVE-CORRESPONDING is_repo TO ls_xml. MOVE-CORRESPONDING is_repo TO ls_xml.
CALL TRANSFORMATION id CALL TRANSFORMATION id
SOURCE (c_type_repo) = ls_xml SOURCE repo = ls_xml
RESULT XML rv_repo_xml_string. RESULT XML rv_repo_xml_string.
ENDMETHOD. ENDMETHOD.