<?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: SAS code for XML file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428845#M105895</link>
    <description>Is there any way that you can help me create the SAS code for the above&lt;BR /&gt;example?&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Jan 2018 15:59:35 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2018-01-18T15:59:35Z</dc:date>
    <item>
      <title>SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428825#M105890</link>
      <description>&lt;P&gt;Is there any way to create a SAS code to produce a dataset from the following XML?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;?xml version="1.0" encoding="iso-8859-1" ?&amp;gt;
&amp;lt;NHL&amp;gt;
  &amp;lt;CONFERENCE&amp;gt; Eastern 
    &amp;lt;DIVISION&amp;gt; Southeast  
      &amp;lt;TEAM name="Thrashers"  abbrev="ATL" /&amp;gt;  
   &amp;lt;/DIVISION&amp;gt;
 &amp;lt;/CONFERENCE&amp;gt; 
&amp;lt;/NHL&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428825#M105890</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-01-18T15:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428836#M105893</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Is there any way to create a SAS code to produce a dataset from the following XML?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;?xml version="1.0" encoding="iso-8859-1" ?&amp;gt;
&amp;lt;NHL&amp;gt;
  &amp;lt;CONFERENCE&amp;gt; Eastern 
    &amp;lt;DIVISION&amp;gt; Southeast  
      &amp;lt;TEAM name="Thrashers"  abbrev="ATL" /&amp;gt;  
   &amp;lt;/DIVISION&amp;gt;
 &amp;lt;/CONFERENCE&amp;gt; 
&amp;lt;/NHL&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, XML Mapper or XML libname. Or you can always parse it manually...sometimes that ends up being the fastest solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:54:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428836#M105893</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-18T15:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428845#M105895</link>
      <description>Is there any way that you can help me create the SAS code for the above&lt;BR /&gt;example?&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428845#M105895</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-01-18T15:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428847#M105896</link>
      <description>&lt;P&gt;Same as every other question, show what you have, what you&amp;nbsp;expect as output and what you've tried and you'll get help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428847#M105896</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-18T16:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428858#M105897</link>
      <description>Hi:&lt;BR /&gt;  What code have you tried? For example, this Tech Support note seems to have an example of reading the NHL xml file using an XML Map: &lt;A href="http://support.sas.com/documentation/cdl/en/engxml/62845/HTML/default/viewer.htm#a002484891.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/engxml/62845/HTML/default/viewer.htm#a002484891.htm&lt;/A&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Thu, 18 Jan 2018 16:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428858#M105897</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-01-18T16:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428866#M105898</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following SAS code :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xmldata "c:\temp\test XML SAS\test.xml";
filename xmlmap  "c:\temp\test XML SAS\mapping.map";
libname  xmldata xml xmlmap=xmlmap;


data test;
set xmldata.mytable;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With test.xml the XML file you described and mapping.map as follows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;SXLEMAP version="1.2" name="SXLEMAP"&amp;gt;
    &amp;lt;TABLE name="mytable"&amp;gt;
        &amp;lt;TABLE-PATH syntax="XPATH"&amp;gt;
           /NHL/CONFERENCE/DIVISION/TEAM
         &amp;lt;/TABLE-PATH&amp;gt;
        &amp;lt;COLUMN name="Conference"&amp;gt;
            &amp;lt;PATH syntax="XPath"&amp;gt;/NHL/CONFERENCE&amp;lt;/PATH&amp;gt;
            &amp;lt;TYPE&amp;gt;character&amp;lt;/TYPE&amp;gt;
            &amp;lt;DATATYPE&amp;gt;string&amp;lt;/DATATYPE&amp;gt;
            &amp;lt;LENGTH&amp;gt;10&amp;lt;/LENGTH&amp;gt;
        &amp;lt;/COLUMN&amp;gt;
        &amp;lt;COLUMN name="Division"&amp;gt;
            &amp;lt;PATH syntax="XPath"&amp;gt;/NHL/CONFERENCE/DIVISION&amp;lt;/PATH&amp;gt;
            &amp;lt;TYPE&amp;gt;character&amp;lt;/TYPE&amp;gt;
            &amp;lt;DATATYPE&amp;gt;string&amp;lt;/DATATYPE&amp;gt;
            &amp;lt;LENGTH&amp;gt;10&amp;lt;/LENGTH&amp;gt;
        &amp;lt;/COLUMN&amp;gt;
        &amp;lt;COLUMN name="Team"&amp;gt;
            &amp;lt;PATH syntax="XPath"&amp;gt;/NHL/CONFERENCE/DIVISION/TEAM@name&amp;lt;/PATH&amp;gt;
            &amp;lt;TYPE&amp;gt;character&amp;lt;/TYPE&amp;gt;
            &amp;lt;DATATYPE&amp;gt;string&amp;lt;/DATATYPE&amp;gt;
            &amp;lt;LENGTH&amp;gt;10&amp;lt;/LENGTH&amp;gt;
        &amp;lt;/COLUMN&amp;gt;
        &amp;lt;COLUMN name="Abbreviation"&amp;gt;
            &amp;lt;PATH syntax="XPath"&amp;gt;/NHL/CONFERENCE/DIVISION/TEAM@abbrev&amp;lt;/PATH&amp;gt;
            &amp;lt;TYPE&amp;gt;character&amp;lt;/TYPE&amp;gt;
            &amp;lt;DATATYPE&amp;gt;string&amp;lt;/DATATYPE&amp;gt;
            &amp;lt;LENGTH&amp;gt;10&amp;lt;/LENGTH&amp;gt;
        &amp;lt;/COLUMN&amp;gt;
    &amp;lt;/TABLE&amp;gt;
&amp;lt;/SXLEMAP&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/428866#M105898</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-01-18T16:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429010#M105947</link>
      <description>&lt;P&gt;Received the following error. Could you please guide me to resolve the issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;24         data test;
25         set xmldata.mytable;
ERROR: Physical file does not exist, /wrk1/mapping.map.
       encountered during XMLMap parsing
       occurred at or near line 1, column 1
ERROR: XML describe error: Internal processing error.
26         run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jan 2018 05:13:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429010#M105947</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-01-19T05:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429042#M105960</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is written in the log :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;ERROR: Physical &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt; does &lt;SPAN class="token operator"&gt;not&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;exist&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;wrk1&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;mapping&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;map&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check that the path to your map file is correct.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 08:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429042#M105960</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-01-19T08:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429047#M105961</link>
      <description>Path is correct.But I don't have that .Map file in that folder.&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Jan 2018 08:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429047#M105961</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-01-19T08:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429049#M105962</link>
      <description>&lt;P&gt;You have to create it there with the contents i provided in my first answer.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 08:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429049#M105962</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-01-19T08:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429055#M105965</link>
      <description>&lt;P&gt;Is there any way to format a XML file which has repetitive elements?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 09:13:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429055#M105965</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-01-19T09:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429062#M105967</link>
      <description>&lt;P&gt;Can we also create the mapping.map via SAS XML mapper?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 09:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429062#M105967</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-01-19T09:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429066#M105968</link>
      <description>&lt;P&gt;Yes, you can use XML mapper to create the map file as suggested by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 09:48:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429066#M105968</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2018-01-19T09:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code for XML file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429733#M106160</link>
      <description>&lt;P&gt;Here is the most recent version of the XML engine book, opened at the topics that discuss the XML Mapper: &lt;A href="http://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=engxml&amp;amp;docsetTarget=n0mxvt7afwoqron1pioilw0vzxq1.htm&amp;amp;locale=en" target="_self"&gt;Using SAS XML Mapper to Generate and Update an XMLMap&lt;/A&gt;.&lt;!-- Place favicon.ico and apple-touch-icon.png in the root directory --&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also two videos about XMLMaps listed under "Videos" at &lt;A href="http://support.sas.com/documentation/onlinedoc/base/index.html" target="_self"&gt;http://support.sas.com/documentation/onlinedoc/base/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 18:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-code-for-XML-file/m-p/429733#M106160</guid>
      <dc:creator>maggiem_sas</dc:creator>
      <dc:date>2018-01-22T18:39:45Z</dc:date>
    </item>
  </channel>
</rss>

