<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: parse xml to multiple flat files with ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786305#M649632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mahesh,&lt;/P&gt;&lt;P&gt;thank you for the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2007 18:45:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-05T18:45:00Z</dc:date>
    <item>
      <title>parse xml to multiple flat files with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786302#M649629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have a big XML file but it has data from different  vendors and we need flat file/vendor how can we achieve this using any ABAP Fm,class etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;basically we need to parse the big xml data into small chunks of the flat files using ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;Babu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 15:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786302#M649629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T15:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml to multiple flat files with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786303#M649630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Here is a program which would read a XML file.. you can get the data into internal table and you cand created flat files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report z_xit_xml_check&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z_xit_xml_check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class cl_ixml definition load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: ixml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of t_xml_line,&lt;/P&gt;&lt;P&gt;data(256) type x,&lt;/P&gt;&lt;P&gt;end of t_xml_line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;begin of tsfixml,&lt;/P&gt;&lt;P&gt;data(1024) type c,&lt;/P&gt;&lt;P&gt;end of tsfixml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_ixml type ref to if_ixml,&lt;/P&gt;&lt;P&gt;l_streamfactory type ref to if_ixml_stream_factory,&lt;/P&gt;&lt;P&gt;l_parser type ref to if_ixml_parser,&lt;/P&gt;&lt;P&gt;l_istream type ref to if_ixml_istream,&lt;/P&gt;&lt;P&gt;l_document type ref to if_ixml_document,&lt;/P&gt;&lt;P&gt;l_node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;l_xmldata type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_elem type ref to if_ixml_element,&lt;/P&gt;&lt;P&gt;l_root_node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;l_next_node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;l_name type string,&lt;/P&gt;&lt;P&gt;l_iterator type ref to if_ixml_node_iterator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_xml_table type table of t_xml_line,&lt;/P&gt;&lt;P&gt;l_xml_line type t_xml_line,&lt;/P&gt;&lt;P&gt;l_xml_table_size type i.&lt;/P&gt;&lt;P&gt;data: l_filename type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: pa_file type char1024 default&lt;/P&gt;&lt;P&gt;'d:\joao\desenvolvimentos\fi\fact\teste.xml'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of XML file: Only DTD included in xml document is supported&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;parameters: pa_val type char1 as checkbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the main iXML factory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_ixml = cl_ixml=&amp;gt;create( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating a stream factory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_streamfactory = l_ixml-&amp;gt;create_stream_factory( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_xml_table changing l_xml_table_size l_xml_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wrap the table containing the file into a stream&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_istream = l_streamfactory-&amp;gt;create_istream_itable( table =&lt;/P&gt;&lt;P&gt;l_xml_table&lt;/P&gt;&lt;P&gt;size =&lt;/P&gt;&lt;P&gt;l_xml_table_size ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating a document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_document = l_ixml-&amp;gt;create_document( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a Parser&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_parser = l_ixml-&amp;gt;create_parser( stream_factory = l_streamfactory&lt;/P&gt;&lt;P&gt;istream = l_istream&lt;/P&gt;&lt;P&gt;document = l_document ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validate a document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if pa_val eq 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_parser-&amp;gt;set_validating( mode = if_ixml_parser=&amp;gt;co_validate ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parse the stream&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if l_parser-&amp;gt;parse( ) ne 0.&lt;/P&gt;&lt;P&gt;if l_parser-&amp;gt;num_errors( ) ne 0.&lt;/P&gt;&lt;P&gt;data: parseerror type ref to if_ixml_parse_error,&lt;/P&gt;&lt;P&gt;str type string,&lt;/P&gt;&lt;P&gt;i type i,&lt;/P&gt;&lt;P&gt;count type i,&lt;/P&gt;&lt;P&gt;index type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count = l_parser-&amp;gt;num_errors( ).&lt;/P&gt;&lt;P&gt;write: count, ' parse errors have occured:'.&lt;/P&gt;&lt;P&gt;index = 0.&lt;/P&gt;&lt;P&gt;while index &amp;lt; count.&lt;/P&gt;&lt;P&gt;parseerror = l_parser-&amp;gt;get_error( index = index ).&lt;/P&gt;&lt;P&gt;i = parseerror-&amp;gt;get_line( ).&lt;/P&gt;&lt;P&gt;write: 'line: ', i.&lt;/P&gt;&lt;P&gt;i = parseerror-&amp;gt;get_column( ).&lt;/P&gt;&lt;P&gt;write: 'column: ', i.&lt;/P&gt;&lt;P&gt;str = parseerror-&amp;gt;get_reason( ).&lt;/P&gt;&lt;P&gt;write: str.&lt;/P&gt;&lt;P&gt;index = index + 1.&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Process the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if l_parser-&amp;gt;is_dom_generating( ) eq 'X'.&lt;/P&gt;&lt;P&gt;perform process_dom using l_document.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form get_xml_table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_xml_table changing l_xml_table_size type i&lt;/P&gt;&lt;P&gt;l_xml_table type standard table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local variable declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: l_len type i,&lt;/P&gt;&lt;P&gt;l_len2 type i,&lt;/P&gt;&lt;P&gt;l_tab type tsfixml,&lt;/P&gt;&lt;P&gt;l_content type string,&lt;/P&gt;&lt;P&gt;l_str1 type string,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;c_conv TYPE REF TO cl_abap_conv_in_ce,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_itab type table of string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_filename = pa_file.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;upload a file from the client's workstation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;filename = l_filename&lt;/P&gt;&lt;P&gt;filetype = 'BIN'&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;filelength = l_xml_table_size&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;data_tab = l_xml_table&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;others = 19.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Writing the XML document to the screen&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLEAR l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT l_xml_table INTO l_xml_line.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;c_conv = cl_abap_conv_in_ce=&amp;gt;create( input = l_xml_line-data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*replacement = space ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;c_conv-&amp;gt;read( IMPORTING data = l_content len = l_len ).&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONCATENATE l_str1 l_content INTO l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_str1 = l_str1+0(l_xml_table_size).&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SPLIT l_str1 AT cl_abap_char_utilities=&amp;gt;cr_lf INTO TABLE l_itab.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /' XML File'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOOP AT l_itab INTO l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;horizontal_tab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*IN&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;l_str1 WITH space.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: / l_str1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE: /.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endform. "get_xml_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form process_dom&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form process_dom using document type ref to if_ixml_document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: node type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;iterator type ref to if_ixml_node_iterator,&lt;/P&gt;&lt;P&gt;nodemap type ref to if_ixml_named_node_map,&lt;/P&gt;&lt;P&gt;attr type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;name type string,&lt;/P&gt;&lt;P&gt;prefix type string,&lt;/P&gt;&lt;P&gt;value type string,&lt;/P&gt;&lt;P&gt;indent type i,&lt;/P&gt;&lt;P&gt;count type i,&lt;/P&gt;&lt;P&gt;index type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: name2 type string,&lt;/P&gt;&lt;P&gt;name_root type string,&lt;/P&gt;&lt;P&gt;node_parent type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;node_root type ref to if_ixml_node,&lt;/P&gt;&lt;P&gt;num_children type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;node ?= document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check not node is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uline.&lt;/P&gt;&lt;P&gt;write: /.&lt;/P&gt;&lt;P&gt;write: /' DOM-TREE'.&lt;/P&gt;&lt;P&gt;write: /.&lt;/P&gt;&lt;P&gt;if node is initial. exit. endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create a node iterator&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;iterator = node-&amp;gt;create_iterator( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get current node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;loop over all nodes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;while not node is initial.&lt;/P&gt;&lt;P&gt;indent = node-&amp;gt;get_height( ) * 2.&lt;/P&gt;&lt;P&gt;indent = indent + 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num_children = node-&amp;gt;num_children( ).&lt;/P&gt;&lt;P&gt;case node-&amp;gt;get_type( ).&lt;/P&gt;&lt;P&gt;when if_ixml_node=&amp;gt;co_node_element.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;element node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;name = node-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;nodemap = node-&amp;gt;get_attributes( ).&lt;/P&gt;&lt;P&gt;node_root = node-&amp;gt;get_root( ).&lt;/P&gt;&lt;P&gt;name_root = node_root-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;write: / 'ELEMENT :'.&lt;/P&gt;&lt;P&gt;write: at indent name color col_positive inverse.&lt;/P&gt;&lt;P&gt;write: 'NUM_CHILDREN:', num_children.&lt;/P&gt;&lt;P&gt;write: 'ROOT:', name_root.&lt;/P&gt;&lt;P&gt;node_parent = node-&amp;gt;get_parent( ).&lt;/P&gt;&lt;P&gt;name2 = node_parent-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;write: 'NAME2: ' , name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not nodemap is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;count = nodemap-&amp;gt;get_length( ).&lt;/P&gt;&lt;P&gt;do count times.&lt;/P&gt;&lt;P&gt;index = sy-index - 1.&lt;/P&gt;&lt;P&gt;attr = nodemap-&amp;gt;get_item( index ).&lt;/P&gt;&lt;P&gt;name = attr-&amp;gt;get_name( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;prefix = attr-&amp;gt;get_namespace_prefix( ).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;value = attr-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;write: / 'ATTRIBUTE:'.&lt;/P&gt;&lt;P&gt;write: at indent name color col_heading inverse, '=',&lt;/P&gt;&lt;P&gt;value color col_total inverse.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;when if_ixml_node=&amp;gt;co_node_text or&lt;/P&gt;&lt;P&gt;if_ixml_node=&amp;gt;co_node_cdata_section.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;value = node-&amp;gt;get_value( ).&lt;/P&gt;&lt;P&gt;write: / 'VALUE :'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mjprocha&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;node_parent = node-&amp;gt;get_parent( ).&lt;/P&gt;&lt;P&gt;write: at indent value color col_group inverse.&lt;/P&gt;&lt;P&gt;name2 = node_parent-&amp;gt;get_name( ).&lt;/P&gt;&lt;P&gt;write: 'NAME2: ' , name2.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;advance to next node&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;node = iterator-&amp;gt;get_next( ).&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;endform. "process_dom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 15:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786303#M649630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T15:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml to multiple flat files with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786304#M649631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you once check with the XML file, might be you its not properly sturctured. look wether all the fields are closed properly. I suppose that there should be some problem within the XML file for that error. if you downloaded that file, try and do it so again; or esle restructure it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 16:06:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786304#M649631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T16:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml to multiple flat files with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786305#M649632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mahesh,&lt;/P&gt;&lt;P&gt;thank you for the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 18:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parse-xml-to-multiple-flat-files-with-abap/m-p/2786305#M649632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T18:45:00Z</dc:date>
    </item>
  </channel>
</rss>

