<?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: XML data extraction without data map in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/253569#M6874</link>
    <description>&lt;P&gt;As noted, the easiest way to do this is with the XMLV2 LIBNAME engine and the AUTOMAP option. By using AUTOMAP=REPLACE, the map file is regenerated each time and is specific to the XML file specified. If you don't like the idea of keeping the map file around between runs, you can automatically throw it away by using a temporary map file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;filename test 'c:\LabReviewMicroSampleData.xml';
filename tempmap temp;
libname test xmlv2 xmlmap=tempmap automap=replace;&lt;/PRE&gt;
&lt;P&gt;I had no problems using this method to create data sets from your posted XML file.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2016 19:26:01 GMT</pubDate>
    <dc:creator>BillM_SAS</dc:creator>
    <dc:date>2016-03-01T19:26:01Z</dc:date>
    <item>
      <title>XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250362#M6713</link>
      <description>hi, 
I need to extract data from an XML file.
Is there any way that I can do it without an XML map and without the default XML variables that comes in the dataset.

Thanks,
Moovendhan Devaraj</description>
      <pubDate>Tue, 16 Feb 2016 15:46:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250362#M6713</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-16T15:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250369#M6714</link>
      <description>&lt;P&gt;Can you please motivate your requirement?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 16:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250369#M6714</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-16T16:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250410#M6715</link>
      <description>&lt;P&gt;Are you referring to an external XML map or one that SAS maps?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 18:17:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250410#M6715</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-16T18:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250464#M6716</link>
      <description>&lt;P&gt;A guess and likely not the most helpful if you have many files, but open the XML in a spreadsheet program. If the data looks "good" save to a CSV and import that&amp;nbsp; perhaps with datastep code to set variable names as you would like.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 22:36:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250464#M6716</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-16T22:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250485#M6718</link>
      <description>&lt;P&gt;Yes. Data step can do that . But that depend on how complicated the XML file is .&lt;/P&gt;
&lt;P&gt;Or you could check xml2 engine. Like : &amp;nbsp; libname x xml2 '......' automap=replace;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 02:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250485#M6718</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-17T02:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250520#M6719</link>
      <description>&lt;P&gt;Let me try this, hope this works....&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 07:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250520#M6719</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-17T07:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250524#M6720</link>
      <description>&lt;P&gt;Sorry for the confusion,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I should have given more specific requirment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have zipped and attached an example&amp;nbsp;XML, and this needs to be imported without an XML map.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to automate this in such a way that any xml file that is been provided needs to be imported without any issue.&lt;/P&gt;
&lt;P&gt;The column names would change&amp;nbsp;with different&amp;nbsp;XML files.&lt;/P&gt;
&lt;P&gt;Kindly help.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 07:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250524#M6720</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-17T07:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250543#M6724</link>
      <description>&lt;P&gt;OK. Here is .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname nhl xmlv2 '/folders/myfolders/LabReviewMicroSampleData.xml'
automap=replace
xmlmap='/folders/myfolders/NhlGenerate.map';
proc contents data=nhl._all_ nodetails;
run;
proc print data=nhl.Sex;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Feb 2016 08:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250543#M6724</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-17T08:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250567#M6725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Xia,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this solution&amp;nbsp;you have used 'nhlgenerate.map'&amp;nbsp;import the data form the XML file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there any way that we can import the data without any XML map been created?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When I tried creating a xml map using XML automap, I getting error due to unavailability of formats and informats. Is it possible for you to share the map, that you used?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250567#M6725</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-17T11:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250569#M6726</link>
      <description>&lt;P&gt;&amp;nbsp;tried this soultion and sas throws an error as below,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR 22-7: Invalid option name AUTOMAP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using sas version 9.3 in my windows PC. does this option work for you, or is it used in some different version of SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250569#M6726</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-17T11:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250572#M6727</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the XML file is not properly organised when I opened it&amp;nbsp;as an excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attaching the XML file for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Moovendhan Devaraj&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250572#M6727</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-17T11:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250616#M6728</link>
      <description>Run the code as is. SAS is creating the map using the automap feature.</description>
      <pubDate>Wed, 17 Feb 2016 13:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250616#M6728</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-17T13:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250731#M6731</link>
      <description>&lt;P&gt;The AUTOMAP option was not available in the XMLV2 LIBNAME engine until the second maintenance release of SAS 9.3. Based on the error message, I suspect you are not at that maintenance level of SAS 9.3.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 22:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250731#M6731</guid>
      <dc:creator>BillM_SAS</dc:creator>
      <dc:date>2016-02-17T22:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250748#M6733</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;xmlmap&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'/folders/myfolders/NhlGenerate.map'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is genereated by SAS . You can assign it &amp;nbsp;any name &amp;nbsp;like x.map yy.map . No need to consider about it.&lt;/P&gt;
&lt;P&gt;If you SAS doesn't has such ability ,try SAS University Edition.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 01:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250748#M6733</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-18T01:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250768#M6734</link>
      <description>&lt;P&gt;you are correct, I am using sas 9.3. Probably not that version that has auto map option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way that I can have that enabled in the current version of&amp;nbsp;SAS, is there any path that needs to be installed to enable this.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 06:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/250768#M6734</guid>
      <dc:creator>DMoovendhan</dc:creator>
      <dc:date>2016-02-18T06:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: XML data extraction without data map</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/253569#M6874</link>
      <description>&lt;P&gt;As noted, the easiest way to do this is with the XMLV2 LIBNAME engine and the AUTOMAP option. By using AUTOMAP=REPLACE, the map file is regenerated each time and is specific to the XML file specified. If you don't like the idea of keeping the map file around between runs, you can automatically throw it away by using a temporary map file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;filename test 'c:\LabReviewMicroSampleData.xml';
filename tempmap temp;
libname test xmlv2 xmlmap=tempmap automap=replace;&lt;/PRE&gt;
&lt;P&gt;I had no problems using this method to create data sets from your posted XML file.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 19:26:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/XML-data-extraction-without-data-map/m-p/253569#M6874</guid>
      <dc:creator>BillM_SAS</dc:creator>
      <dc:date>2016-03-01T19:26:01Z</dc:date>
    </item>
  </channel>
</rss>

