<?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 How to create sas dataset from XML file (without using xml Engine ) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14768#M2469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not a licenced product, it is just part of Base SAS so you will not see it listed by proc setinit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try running this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename yt url '&lt;A class="jive-link-external-small" href="http://gdata.youtube.com/feeds/api/videos/pzI4D6dyp_o/comments?v=2&amp;amp;max-results=50&amp;amp;start-index=1';"&gt;http://gdata.youtube.com/feeds/api/videos/pzI4D6dyp_o/comments?v=2&amp;amp;max-results=50&amp;amp;start-index=1';&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname ytube xml xmlfileref=yt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ytube;&lt;/P&gt;&lt;P&gt;set ytube.entry;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is without defining a proper xml map for this feed so it is not perfect, just to show you that you can use xml engine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2011 21:13:12 GMT</pubDate>
    <dc:creator>FriedEgg</dc:creator>
    <dc:date>2011-12-14T21:13:12Z</dc:date>
    <item>
      <title>How to create sas dataset from XML file (without using xml Engine )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14765#M2466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is there any way we can create datasets from XML file without using XML engine? I don't have xml engine.&lt;/P&gt;&lt;P&gt;What is the easiest and best method to create sas datasets from xml file using base sas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 20:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14765#M2466</guid>
      <dc:creator>jonam</dc:creator>
      <dc:date>2011-12-14T20:19:29Z</dc:date>
    </item>
    <item>
      <title>How to create sas dataset from XML file (without using xml Engine )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14766#M2467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The XML LIBNAME Engine is a part of Base SAS since at least version 8.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 20:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14766#M2467</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-12-14T20:23:40Z</dc:date>
    </item>
    <item>
      <title>How to create sas dataset from XML file (without using xml Engine )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14767#M2468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really....I'm using SAS 9.1. I checked it by running proc setinit; run; I didn't see xml engine.&amp;nbsp; &lt;/P&gt;&lt;P&gt;How can i use the xml libname engine in base sas.&lt;/P&gt;&lt;P&gt;Thanks a ton for your quick responese.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 20:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14767#M2468</guid>
      <dc:creator>jonam</dc:creator>
      <dc:date>2011-12-14T20:42:40Z</dc:date>
    </item>
    <item>
      <title>How to create sas dataset from XML file (without using xml Engine )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14768#M2469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not a licenced product, it is just part of Base SAS so you will not see it listed by proc setinit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try running this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename yt url '&lt;A class="jive-link-external-small" href="http://gdata.youtube.com/feeds/api/videos/pzI4D6dyp_o/comments?v=2&amp;amp;max-results=50&amp;amp;start-index=1';"&gt;http://gdata.youtube.com/feeds/api/videos/pzI4D6dyp_o/comments?v=2&amp;amp;max-results=50&amp;amp;start-index=1';&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname ytube xml xmlfileref=yt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ytube;&lt;/P&gt;&lt;P&gt;set ytube.entry;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is without defining a proper xml map for this feed so it is not perfect, just to show you that you can use xml engine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 21:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14768#M2469</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-12-14T21:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create sas dataset from XML file (without using xml Engine )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14769#M2470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Since the XML Libname Engine is part of Base SAS, you won't see it in PROC SETINIT. (you don't see PROC PRINT, FREQ or MEANS in SETINIT either, but you can still use them).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK...let's assume that you have an XML file stored in &lt;STRONG&gt;c:\temp\giftidea.xml&lt;/STRONG&gt; (as shown in the attached screenshot). Then this code (in 9.2 or higher) would read the XML file into a SAS dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** for 9.2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;/* libname giftxml xml92 'c:\temp\giftidea.xml';&amp;nbsp; */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** for 9.1.3;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;libname giftxml xml 'c:\temp\giftidea.xml';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc contents data=giftxml._all_;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data mygifts;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; set giftxml.giftidea;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=work.mygifts;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;libname giftxml clear;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If your data are not in a simple structure, as defined in the doc for the Libname Engine, then you would have to use an XML Map file to map from more hierarchical XML to SAS dataset form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10938iC1290D37664AAC14/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="pix_giftidea_xml.jpg" title="pix_giftidea_xml.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 21:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-create-sas-dataset-from-XML-file-without-using-xml-Engine/m-p/14769#M2470</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-12-14T21:27:29Z</dc:date>
    </item>
  </channel>
</rss>

