<?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: How to read an XML file in SAS without SAS XML Mapper in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320405#M9197</link>
    <description>&lt;P&gt;You can create library to read XML files in BASE SAS,&lt;/P&gt;&lt;P&gt;sample libname syntax:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;libname out xml 'C:\xml_folder\sample_xml file.xml'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more details please refer this links:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/119-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/119-29.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings12/253-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/253-2012.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2016 06:56:49 GMT</pubDate>
    <dc:creator>Kalind_Patel</dc:creator>
    <dc:date>2016-12-21T06:56:49Z</dc:date>
    <item>
      <title>How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320404#M9196</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an XML file, whcih i want to read in SAS. I tried reading the file through the libname xml engine.&lt;/P&gt;
&lt;P&gt;libname myxxml xml 'c:\users\mine\desktop\project.xml';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;however the same is not accessible, as it needs an XML Mapper file to read it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have read that XML Mapper is a different software and it will create a xml mapper file which i need to use to read the xml.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me if they have any idea how we can create the xml mapper file and read the xml file in the bach mode?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 06:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320404#M9196</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2016-12-21T06:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320405#M9197</link>
      <description>&lt;P&gt;You can create library to read XML files in BASE SAS,&lt;/P&gt;&lt;P&gt;sample libname syntax:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;libname out xml 'C:\xml_folder\sample_xml file.xml'; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more details please refer this links:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/119-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/119-29.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings12/253-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/253-2012.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 06:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320405#M9197</guid>
      <dc:creator>Kalind_Patel</dc:creator>
      <dc:date>2016-12-21T06:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320406#M9198</link>
      <description>&lt;P&gt;You can download the XML mapper from here at no extra cost:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/downloads/package.htm?pid=1278" target="_blank"&gt;https://support.sas.com/downloads/package.htm?pid=1278&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use an XML as input for the tool to create an XMLMAP but if this is for an ongoing process then make sure that the XML you use for this contains all the elements possible or even better use the related XSD for creation of the XMLMAP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 06:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320406#M9198</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-12-21T06:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320407#M9199</link>
      <description>&lt;P&gt;Thanks, but that won't work, as the xml uses xml map. I already had tried and mentioned the same in my original post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 07:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320407#M9199</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2016-12-21T07:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320408#M9200</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34466"&gt;@mnjtrana&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The articles&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/71754"&gt;@Kalind_Patel&lt;/a&gt;&amp;nbsp;posted will give you the necessary details of how you can create such an XMLMap (and you can download the tool itself from the link I've posted in my previous answer).&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 07:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320408#M9200</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-12-21T07:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320417#M9201</link>
      <description>&lt;P&gt;This is an ongoing process and everytime the xml is different, so everytime a new xml map needs to be generated. also this all needs to be done in batch, non interactive.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So i think the solution suggested won't work,&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 07:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320417#M9201</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2016-12-21T07:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320425#M9202</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34466"&gt;@mnjtrana&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;With any data exchange you need to have defined data structures. In an XML world an XSD (XML Schema Definition) provides such a definition. If you create your XMLMap using an XSD then the XML's you get can vary but as long as they conform with the XSD (which they must to be valid) your XMLMap will work and you will be able to read the data into SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't have an XSD then you need to make sure that you use an XML which contains all the data elements possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no other way of making this work and it's on this level also no more SAS specific but would apply to any application parsing the source XML. You need to know what you have to expect (=XSD).&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 08:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320425#M9202</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-12-21T08:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320455#M9203</link>
      <description>&lt;P&gt;Try XMLV2 engine. if you are lucky, SAS will generate that MAP for you automatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename xx temp;
libname xx xmlv2 '/folders/myfolders/temp.xml' automap=replace xmlmap=xx;
proc copy in=xx out=work noclone;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Dec 2016 10:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320455#M9203</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-12-21T10:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320472#M9205</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;that worked, however for a few XML's the data is getting truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Data Truncation occured on variable Taskcode Column length=469 Additional length = 603.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a data length warning. Do we have some option so that all the data can be taken in, instead of truncation.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 11:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320472#M9205</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2016-12-21T11:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320479#M9208</link>
      <description>&lt;PRE&gt;
Not sure if the following could work.

filename xx temp;
libname xx xmlv2 '/folders/myfolders/temp.xml' automap=replace xmlmap=xx ;

libname zz cvp '/folders/myfolders/' cvpmult=2;
proc copy in=xx out=zz noclone;
run;

&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Dec 2016 11:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320479#M9208</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-12-21T11:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to read an XML file in SAS without SAS XML Mapper</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320646#M9212</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34466"&gt;@mnjtrana&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;If you're implementing for some user triggered process then what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;proposed is a very acceptable&amp;nbsp;approach, but if you're implementing for a production worthy scheduled batch process then you do need to know your data in advance and I'd call anything not using a pre-defined XML map as sub-standard.&lt;/P&gt;
&lt;P&gt;The length issue you've just encountered should give you a hint why I'm making such a strong statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 00:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-read-an-XML-file-in-SAS-without-SAS-XML-Mapper/m-p/320646#M9212</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-12-22T00:02:38Z</dc:date>
    </item>
  </channel>
</rss>

