<?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: XMLV2 libname &amp;quot;Invalid file type&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404824#M98410</link>
    <description>&lt;P&gt;Thanks Chris. I have that working (direct to XML file) but do you know why SAS allows a 1 level directory but not 2 levels when it comes to XMLV2?&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 15:10:03 GMT</pubDate>
    <dc:creator>AlanC</dc:creator>
    <dc:date>2017-10-17T15:10:03Z</dc:date>
    <item>
      <title>XMLV2 libname "Invalid file type"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404796#M98396</link>
      <description>&lt;P&gt;I have something odd that I don't seem to recall seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a directory on machine: c:\temp\work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I issue the following code:&amp;nbsp; libname TEST xmlv2 'c:\temp\work' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"ERROR: Invalid file type"&lt;BR /&gt;"ERROR: Error in the LIBNAME statement"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I issue the following code: libname TEST xmlv2 'c:\temp'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The library is allocated. Hence, XMLV2 does not like the second level directory.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If I use the XML engine vs XMLV2, the 2 level name is allocated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone shed some light? My searches have come up empty.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 14:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404796#M98396</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-10-17T14:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: XMLV2 libname "Invalid file type"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404800#M98397</link>
      <description>&lt;P&gt;You have to point this libname to an actual XML file, not a directory.&amp;nbsp; Assign one libname per XML file that you want to process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname TEST xmlv2 'c:\temp\work\file.xml'&amp;nbsp;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename source&amp;nbsp;&amp;nbsp;'c:\temp\work\file.xml';
libname test xmlv2 xmlfileref=source;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 14:13:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404800#M98397</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-10-17T14:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: XMLV2 libname "Invalid file type"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404824#M98410</link>
      <description>&lt;P&gt;Thanks Chris. I have that working (direct to XML file) but do you know why SAS allows a 1 level directory but not 2 levels when it comes to XMLV2?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 15:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404824#M98410</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-10-17T15:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: XMLV2 libname "Invalid file type"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404832#M98412</link>
      <description>&lt;P&gt;Hey Alan -- I'm not familiar with that limitation/behavior.&amp;nbsp; Every time I've used the XML engine, I've specified a full path to an XML file and usually an XML map, since XML-in-the-wild is rarely structured as a usable data source.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 15:28:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404832#M98412</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-10-17T15:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: XMLV2 libname "Invalid file type"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404834#M98413</link>
      <description>&lt;P&gt;The issue is in a dynamic XML world where the XML is somewhat unknown on arrival. If you have a simple libname statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname TEST xmlv2 'c:\temp' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can dump 1+ XML files into it. Any writing to that libname results in an XML file so it is very convenient as an XML workarea. Hence, I can now do something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data cars;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; set TEST.CARS ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, if a cars.xml file is in c:\temp, it works. Likewise, if I write back to it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data TEST.MYCARS;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; set cars;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will create the SAS dataset as an XML file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it can be worked around but it is very convenient to just have a directory to mess with vs map files. I just don't understand why it will only take 1 level directory names. Weird.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 15:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XMLV2-libname-quot-Invalid-file-type-quot/m-p/404834#M98413</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-10-17T15:37:51Z</dc:date>
    </item>
  </channel>
</rss>

