<?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: save xstring as XML file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156448#M1621798</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;you use the iXML stream factory to create the input stream from the xstring, and then you parse it into the iXML document.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA lo_ixml TYPE REF TO if_ixml.
DATA lo_streamfactory TYPE REF TO if_ixml_stream_factory.
lo_ixml = cl_ixml=&amp;gt;create( ).
lo_streamfactory = lo_ixml-&amp;gt;create_stream_factory( ).
DATA lo_istream TYPE REF TO if_ixml_istream.
lo_istream = lo_streamfactory-&amp;gt;create_istream_xstring( string = your_xstring ).
DATA lo_document TYPE REF TO if_ixml_document.
lo_document = lo_ixml-&amp;gt;create_document( ).
DATA lo_parser TYPE REF TO if_ixml_parser.
lo_parser = lo_ixml-&amp;gt;create_parser( stream_factory = lo_streamfactory
                                      istream        = lo_istream
                                      document       = lo_document ).
lo_parser-&amp;gt;parse( ). "&amp;lt;=== fill lo_document from your_xstring
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can play with lo_document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Sep 2011 19:04:41 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2011-09-10T19:04:41Z</dc:date>
    <item>
      <title>save xstring as XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156445#M1621795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way to save a xstring as XML file? There ist a function modul which i can use to convert it to a table SMUM_XML_PARSE. But i want to save it directly without converting it to a table an then create a xml and save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   thx,&lt;/P&gt;&lt;P&gt;     Ming&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Sep 2011 17:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156445#M1621795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-10T17:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: save xstring as XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156446#M1621796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wei Ming,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;an xstring may contain any non-character data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XML&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Valid characters&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Main article: Valid characters in XML&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Unicode code points in the following ranges are valid in XML 1.0 documents:[9]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;U&lt;/EM&gt;0009, U&lt;EM&gt;000A, U&lt;/EM&gt;000D: these are the only C0 controls accepted in XML 1.0;+&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;U&lt;/EM&gt;0020u2013U&lt;EM&gt;D7FF, U&lt;/EM&gt;E000u2013U&lt;EM&gt;FFFD: this excludes some (not all) non-characters in the BMP (all surrogates, U&lt;/EM&gt;FFFE and U&lt;EM&gt;FFFF are forbidden);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;U&lt;/EM&gt;10000u2013U&lt;EM&gt;10FFFF: this includes all code points in supplementary planes, including non-characters.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;XML 1.1[10] extends the set of allowed characters to include all the above, plus the remaining characters in the range U&lt;/EM&gt;0001u2013U&lt;EM&gt;001F. At the same time, however, it restricts the use of C0 and C1 control characters other than U&lt;/EM&gt;0009, U&lt;EM&gt;000A, U&lt;/EM&gt;000D, and U&lt;EM&gt;0085 by requiring them to be written in escaped form (for example U&lt;/EM&gt;0001 must be written as &amp;amp;#x01; or its equivalent). In the case of C1 characters, this restriction is a backwards incompatibility; it was introduced to allow common encoding errors to be detected.+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code point U+0000 is the only character that is not permitted in any XML 1.0 or 1.1 document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give an example of hexa xstring content and expected XML result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Sep 2011 17:56:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156446#M1621796</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-09-10T17:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: save xstring as XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156447#M1621797</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;the xstring was build by one of my routine. I created a XML via the SAP XML library (iXML) and converted it to a xstring.  Now i want to convert the xtsring back into the XML. How can i do this? Sure i could create a XML table with the DOM object, but now i want to convert it back from the xstring. Is there a way to use the iXML library?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   thx,&lt;/P&gt;&lt;P&gt;      Ming.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Sep 2011 18:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156447#M1621797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-10T18:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: save xstring as XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156448#M1621798</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;you use the iXML stream factory to create the input stream from the xstring, and then you parse it into the iXML document.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA lo_ixml TYPE REF TO if_ixml.
DATA lo_streamfactory TYPE REF TO if_ixml_stream_factory.
lo_ixml = cl_ixml=&amp;gt;create( ).
lo_streamfactory = lo_ixml-&amp;gt;create_stream_factory( ).
DATA lo_istream TYPE REF TO if_ixml_istream.
lo_istream = lo_streamfactory-&amp;gt;create_istream_xstring( string = your_xstring ).
DATA lo_document TYPE REF TO if_ixml_document.
lo_document = lo_ixml-&amp;gt;create_document( ).
DATA lo_parser TYPE REF TO if_ixml_parser.
lo_parser = lo_ixml-&amp;gt;create_parser( stream_factory = lo_streamfactory
                                      istream        = lo_istream
                                      document       = lo_document ).
lo_parser-&amp;gt;parse( ). "&amp;lt;=== fill lo_document from your_xstring
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can play with lo_document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Sep 2011 19:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156448#M1621798</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-09-10T19:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: save xstring as XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156449#M1621799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-avatarid="41205" data-userid="331000" data-username="sandra.rossi" href="https://answers.sap.com/people/sandra.rossi" style="font-size: 12px; color: #3778c7; text-decoration: underline !important; background: #ffffff;"&gt;Sandra Rossi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me in which variable we get the XML value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA lo_ixml TYPE REF TO if_ixml.&lt;/P&gt;&lt;P&gt;DATA lo_streamfactory TYPE REF TO if_ixml_stream_factory.&lt;/P&gt;&lt;P&gt;DATA lo_istream TYPE REF TO if_ixml_istream.&lt;/P&gt;&lt;P&gt;DATA lo_document TYPE REF TO if_ixml_document.&lt;/P&gt;&lt;P&gt;DATA lo_parser TYPE REF TO if_ixml_parser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lo_ixml = cl_ixml=&amp;gt;create( ).&lt;/P&gt;&lt;P&gt;lo_streamfactory = lo_ixml-&amp;gt;create_stream_factory( ).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;lo_istream = lo_streamfactory-&amp;gt;create_istream_xstring( string = your_xstring ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;lo_document = lo_ixml-&amp;gt;create_document( ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;lo_parser = lo_ixml-&amp;gt;create_parser( stream_factory = lo_streamfactory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; istream&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = lo_istream&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = lo_document ).&lt;/P&gt;&lt;P&gt;lo_parser-&amp;gt;parse( ). "&amp;lt;=== fill lo_document from your_xstring&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/thread/3874784" style="font-size: 13.3333px;"&gt;https://scn.sap.com/thread/3874784&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Madhu M V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 13:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156449#M1621799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-08T13:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: save xstring as XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156450#M1621800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Madhu, &lt;SPAN style="text-decoration: line-through;"&gt;the XML goes to the variable "your_xstring"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;edit: sorry, it's a code to load "your_xstring" variable into an iXML instance, that you may query using the iXML methods.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 15:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/save-xstring-as-xml-file/m-p/8156450#M1621800</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-03-08T15:29:44Z</dc:date>
    </item>
  </channel>
</rss>

