<?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: how to validate xml file ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-xml-file/m-p/6611240#M1438991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ampersand is not allowed in XML CDATA, you must use the entity &amp;amp;amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Feb 2010 12:05:12 GMT</pubDate>
    <dc:creator>rainer_hbenthal</dc:creator>
    <dc:date>2010-02-01T12:05:12Z</dc:date>
    <item>
      <title>how to validate xml file ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-xml-file/m-p/6611239#M1438990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to validate my xml import file but I can't find proper validation and error message. &lt;/P&gt;&lt;P&gt;the source where it originates is a system where also texts can be entered manually which are part of the xml file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I discoverd myself that &amp;amp; and ! are characters which are not allowed. but I'm looking for a way to check this before I process the xml file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this coding and I found smum_xml_parse but still the error is not clear about what is wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;try.
    CALL TRANSFORMATION ('ID')
    SOURCE XML it_xml_import
    RESULT order_header_in = st_sdhd1 order_conditions_in = ta_cond  order_partners = ta_parnr  order_text = ta_sdtext order_items_in = ta_sditm
      .


CATCH cx_xslt_exception INTO xslt_error.
xslt_message = xslt_error-&amp;gt;get_text( ).
    ASSIGN COMPONENT 'ERROR' OF STRUCTURE &amp;lt;l_line&amp;gt; TO &amp;lt;l_field&amp;gt;.
    &amp;lt;l_field&amp;gt; = xslt_message.

data: gt_temp type STANDARD TABLE OF SMUM_XMLTB.
itx_xml_import = it_xml_import.
CALL FUNCTION 'SMUM_XML_PARSE'
  EXPORTING
    xml_input       = itx_xml_import
  tables
    xml_table       = gt_temp
    return          = ta_ret2
          .


ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the xslt_message is also very unclear of what is exactly wrong with the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are there any function which can give me more detailed information about the xml file and what is wrong with it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: A. de Smidt on Feb 1, 2010 10:34 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2010 09:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-xml-file/m-p/6611239#M1438990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-01T09:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate xml file ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-xml-file/m-p/6611240#M1438991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ampersand is not allowed in XML CDATA, you must use the entity &amp;amp;amp;amp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2010 12:05:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-xml-file/m-p/6611240#M1438991</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2010-02-01T12:05:12Z</dc:date>
    </item>
  </channel>
</rss>

