anchor.diff:        ENDIF.
       ENDIF.
   
  -    name_escape( CHANGING cv_text = lv_name ).
  -
       li_element = mi_xml_doc->create_element( lv_name ).
   
       lv_string  = ig_element.
  
positive.code:   ENDMETHOD.                    "xml_render
  
  
    METHOD name_escape.
  *    Besides the XML-reserved character ( <, >, &, % ) there are other characters which should be replaced
  *    in order to create a valid xml. One of them e. g. is the forward-slash at the beginning contained
  *    in namespaces. Included e. g. in a table's name, this will screw-up the xml.
      DATA ls_escape_map LIKE LINE OF mt_escape_map.
  
      LOOP AT mt_escape_map INTO ls_escape_map.
        IF iv_revert = abap_false.
  *      check whether the original text contains an escape sequence. If this was the case, the reading of the data would be corrupted
          IF cv_text CS ls_escape_map-forbidden_char
              AND cv_text CS ls_escape_map-escape_sequence.
            RAISE EXCEPTION TYPE lcx_exception EXPORTING iv_text = |Text to be escaped contains escape-sequence { ls_escape_map-escape_sequence }|.
          ENDIF.
          REPLACE ALL OCCURRENCES OF ls_escape_map-forbidden_char IN cv_text WITH ls_escape_map-escape_sequence.
        ELSE.
          REPLACE ALL OCCURRENCES OF ls_escape_map-escape_sequence IN cv_text WITH ls_escape_map-forbidden_char.
        ENDIF.
      ENDLOOP.
  
    ENDMETHOD.
  
  ENDCLASS.                    "lcl_xml IMPLEMENTATION
  
  
negative.code:       IMPORTING ii_root           TYPE REF TO if_ixml_element OPTIONAL
                  iv_name           TYPE string
        RETURNING VALUE(ri_element) TYPE REF TO if_ixml_element.
  
    PRIVATE SECTION.
      DATA: mi_ixml TYPE REF TO if_ixml,
            mi_root TYPE REF TO if_ixml_element.
  
      METHODS special_names
        CHANGING cv_name TYPE string.
  