<?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: Validating XML file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34107#M6711</link>
    <description>Thnx Cynthia &lt;BR /&gt;
:)</description>
    <pubDate>Fri, 22 May 2009 12:11:41 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-05-22T12:11:41Z</dc:date>
    <item>
      <title>Validating XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34103#M6707</link>
      <description>Hello!!!!&lt;BR /&gt;
&lt;BR /&gt;
I am using an XML input file to capture the data. I have created an XML Map file by using SAS XML Mapper and this map file is refered by SAS XML Engine to fetch the data from input XML file with the proper hierarchy.&lt;BR /&gt;
&lt;BR /&gt;
The real issue is, if the input XML file is not syntactically correct, the XML Engine throws exception. Just wanted to know if there is any way that SAS will first validate the structure of XML file (may be something like XML Schema validation) and if its a valid structure then only SAS will read the file else it will give a message (or return code) saying invalid XML input file.&lt;BR /&gt;
&lt;BR /&gt;
Any help regarding this issue will be highly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
 - Kapil</description>
      <pubDate>Wed, 20 May 2009 05:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34103#M6707</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-20T05:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Validating XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34104#M6708</link>
      <description>Hi:&lt;BR /&gt;
  Refer to the FAQ here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/engxml/61740/HTML/default/a002591914.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/engxml/61740/HTML/default/a002591914.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
where it says on this topic: &lt;B&gt;&lt;BR /&gt;
"Does the XML Engine Validate an XML Document? &lt;BR /&gt;
                           &lt;BR /&gt;
The XML engine does not validate an input XML document. The engine assumes that the data passed to it is in valid, well-formed XML markup. Because the engine does not use a DTD (Document Type Definition) or SCHEMA, there is nothing to validate against." &lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 20 May 2009 15:34:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34104#M6708</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-05-20T15:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Validating XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34105#M6709</link>
      <description>Oh Okies!!!!&lt;BR /&gt;
&lt;BR /&gt;
However I have found the below link where an approach to read XML using SAS Data step is mentioned. But unfortunately it does not contain the SAS source code.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi29/036-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/036-29.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Any idea if there is an algorithm or source code readily available on SAS Support?&lt;BR /&gt;
&lt;BR /&gt;
regards&lt;BR /&gt;
Kapil</description>
      <pubDate>Thu, 21 May 2009 15:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34105#M6709</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-21T15:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Validating XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34106#M6710</link>
      <description>Hi:&lt;BR /&gt;
  Look on page 12 of the paper. The author says he is willing to share the Data step code. Since his method essentially bypasses both XMLMapper and PROC TEMPLATE, you would either need to write your own DATA step code or get the code from this paper author.&lt;BR /&gt;
&lt;BR /&gt;
Also, note that on page 11 of his paper, he says that: &lt;B&gt;&lt;BR /&gt;
"An alternative to the LIBNAME XML engine for XML import and PROC TEMPLATE for export is to flatten the hierarchical XML into a numerically indexed representation that presents nothing new to the SAS programmer, unlike native XML. This method is the basis for the import and export of XML that takes place 100% in the familiar DATA step." &lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
This flattening of the hierarchy would -still- mean that SAS is &lt;B&gt;NOT&lt;/B&gt; checking the XML file for whether it is valid, well-formed or conforming to the schema or DTD. So it would be possible in this method for you to work with a badly formed, and/or invalid XML file.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 21 May 2009 21:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34106#M6710</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-05-21T21:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Validating XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34107#M6711</link>
      <description>Thnx Cynthia &lt;BR /&gt;
:)</description>
      <pubDate>Fri, 22 May 2009 12:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Validating-XML-file/m-p/34107#M6711</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-22T12:11:41Z</dc:date>
    </item>
  </channel>
</rss>

