<?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: cl_xml_ducument with empty nodes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247727#M1630733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found the solution: instead of create_with_data using set_sata with parameter "control".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*    CALL METHOD o_xml-&amp;gt;create_with_data( dataobject = &amp;lt;dat&amp;gt; ).
    DATA lf_retcode type sy-subrc.
    DATA ls_Control TYPE DCXMLSERCL. "OPTIONAL
    " don't leave empty parts away:
    ls_Control-INIT_TREAT = 'N'.

    CALL METHOD o_xml-&amp;gt;set_data
      EXPORTING
*        name        = 'DATA'
*        alias       =
        dataobject  = gt_Rentob
*        parent_node =
         control     = ls_Control
      receiving
        retcode     = lf_retcode
        .

*    CALL METHOD o_xml-&amp;gt;create_with_data
*      EXPORTING
**        name       = 'DATA'
*        dataobject = gt_Rentob
*      receiving
*        retcode    = lf_retcode.

" for testing only:
    CALL METHOD o_xml-&amp;gt;display
*      EXPORTING
*        with_bdn = SPACE
        .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 10:48:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-11T10:48:51Z</dc:date>
    <item>
      <title>cl_xml_ducument with empty nodes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247725#M1630731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use cl_xml_document with  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method o_xml-&amp;gt;create_with_data( dataobject = data_tab ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to generate an xml document.&lt;/P&gt;&lt;P&gt;data tab is being created on basis of a deep structure. Whenever a deep structure is empty the resulting node is being neglected and won't show op in the xml document.&lt;/P&gt;&lt;P&gt;I do want the node to show up, any idea?   &lt;/P&gt;&lt;P&gt;Up!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: axeleration on Oct 11, 2011 9:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 12:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247725#M1630731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-10T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: cl_xml_ducument with empty nodes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247726#M1630732</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;Put a condition that whenever you encounter a empty deep structure. Fill the node with empty SPACE(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this &amp;amp; let me know if this works for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 09:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247726#M1630732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T09:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: cl_xml_ducument with empty nodes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247727#M1630733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found the solution: instead of create_with_data using set_sata with parameter "control".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*    CALL METHOD o_xml-&amp;gt;create_with_data( dataobject = &amp;lt;dat&amp;gt; ).
    DATA lf_retcode type sy-subrc.
    DATA ls_Control TYPE DCXMLSERCL. "OPTIONAL
    " don't leave empty parts away:
    ls_Control-INIT_TREAT = 'N'.

    CALL METHOD o_xml-&amp;gt;set_data
      EXPORTING
*        name        = 'DATA'
*        alias       =
        dataobject  = gt_Rentob
*        parent_node =
         control     = ls_Control
      receiving
        retcode     = lf_retcode
        .

*    CALL METHOD o_xml-&amp;gt;create_with_data
*      EXPORTING
**        name       = 'DATA'
*        dataobject = gt_Rentob
*      receiving
*        retcode    = lf_retcode.

" for testing only:
    CALL METHOD o_xml-&amp;gt;display
*      EXPORTING
*        with_bdn = SPACE
        .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 10:48:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-xml-ducument-with-empty-nodes/m-p/8247727#M1630733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T10:48:51Z</dc:date>
    </item>
  </channel>
</rss>

