<?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: Extracting cdata from xml file ( if_ixml_cdata_section ) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160371#M1622173</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; Method GET_VALUE() returns value of type string.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;text = node-&amp;gt;get_value( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  Please check type of text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2011 05:16:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-18T05:16:39Z</dc:date>
    <item>
      <title>Extracting cdata from xml file ( if_ixml_cdata_section )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160369#M1622171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We will receive xml files containing product data that I want to upload into the sales text of our materials in JP28.&lt;/P&gt;&lt;P&gt;Using the iXML library with T_FILE_PARSE program as an example I can easily extract most fields but the problem is that one field has paragraphs of text in CData. Using the code bellow I can extract some of the data as a string but it's too short to get everything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case node-&amp;gt;get_type( ).
      when if_ixml_node=&amp;gt;co_node_cdata_section.
        break grainneq.

        text = node-&amp;gt;get_value( ).
        write: / 'CDATA:'.
        write at indent text color col_group inverse.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking in the library&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 04:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160369#M1622171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T04:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting cdata from xml file ( if_ixml_cdata_section )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160370#M1622172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the XML file tag I'm concerned with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;longDescription&amp;gt;&amp;lt;![CDATA[This chapter contains blah blah blah goes on for a few paragraphs&lt;/P&gt;&lt;P&gt;.......................................&lt;/P&gt;&lt;P&gt;.......................................&lt;/P&gt;&lt;P&gt;]]&amp;gt;&amp;lt;/longDescription&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 05:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160370#M1622172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T05:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting cdata from xml file ( if_ixml_cdata_section )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160371#M1622173</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; Method GET_VALUE() returns value of type string.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;text = node-&amp;gt;get_value( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  Please check type of text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 05:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160371#M1622173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T05:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting cdata from xml file ( if_ixml_cdata_section )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160372#M1622174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as shakar said , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lt_text type table of string .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lt_text[] = node-&amp;gt;get_value( ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 07:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160372#M1622174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T07:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting cdata from xml file ( if_ixml_cdata_section )</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160373#M1622175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, text was in fact receiving the full string (I thought it was truncating).&lt;/P&gt;&lt;P&gt;So I've just added a function module to split the string into lines that the CREATE_TEXT fm can handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both responses were helpful so I've awarded points....although the question was probably confusing to you as the data was there along:) &lt;/P&gt;&lt;P&gt;Thanks for the quick response in any case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;when if_ixml_node=&amp;gt;co_node_cdata_section.
        
        text = node-&amp;gt;get_value( ).

        call function 'SWA_STRING_SPLIT'
          exporting
            input_string           = text
            max_component_length   = 132
          tables
            string_components      = swastrtab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 05:43:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-cdata-from-xml-file-if-ixml-cdata-section/m-p/8160373#M1622175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-19T05:43:53Z</dc:date>
    </item>
  </channel>
</rss>

