<?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 do I create XML using XMLMAP? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391343#M277668</link>
    <description>&lt;P&gt;Try this link:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/engxml/65362/HTML/default/viewer.htm#p030dni55gms3qn1xxc7xxpzn06p.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/engxml/65362/HTML/default/viewer.htm#p030dni55gms3qn1xxc7xxpzn06p.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also simply write it out using PUT statements. Quick pseudocode:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_ ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; file 'c:\temp\test.xml' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; set ds ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; put &amp;nbsp; '&amp;lt;tag&amp;gt;' value '&amp;lt;/tag&amp;gt;'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; / '&amp;lt;tag2&amp;gt;' value2 '&amp;lt;/tag2&amp;gt;';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2017 22:53:18 GMT</pubDate>
    <dc:creator>AlanC</dc:creator>
    <dc:date>2017-08-28T22:53:18Z</dc:date>
    <item>
      <title>How do I create XML using XMLMAP?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391326#M277665</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a request from the sponsor to create XML file. They provided sample XML and XMLMAP files. XML generation was new to me so I searched online, but it seemed that XMLMAP was used more often for importing XML. I also tried the method&amp;nbsp;from the post &lt;A href="http://support.sas.com/kb/47/349.html" target="_blank"&gt;http://support.sas.com/kb/47/349.html&lt;/A&gt;&amp;nbsp;but got an error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code to create XML:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xmlmap &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"/sasdata/un0101/projects/&amp;amp;clnt/&amp;amp;pcn/&amp;amp;task/&amp;amp;mode/rawdata/test.xml"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; map &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"/sasdata/un0101/projects/&amp;amp;clnt/&amp;amp;pcn/&amp;amp;task/&amp;amp;mode/rawdata/map.map"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xmlmap &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xml92&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xmltype&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=xmlmap &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xmlmap&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=map;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xmlmap.ODM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ODM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error Message:&lt;/P&gt;&lt;P&gt;ERROR: The data set name 'ODM' does not match any name= attribute in the TABLE elements of the XMLMap file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshot of XMLMAP structure.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XMLMAP.png" style="width: 163px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14674i5742230C1B899F60/image-size/large?v=v2&amp;amp;px=999" role="button" title="XMLMAP.png" alt="XMLMAP.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything wrong I did? Can anyone help me on creating XML file with XMLMAP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yangyin&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 20:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391326#M277665</guid>
      <dc:creator>huyy49</dc:creator>
      <dc:date>2017-08-28T20:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create XML using XMLMAP?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391333#M277666</link>
      <description>&lt;P&gt;By&amp;nbsp; anychance did you mean to use xmlv2 instead of xml92 on the libname statemen?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 21:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391333#M277666</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-28T21:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create XML using XMLMAP?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391337#M277667</link>
      <description>&lt;P&gt;Thank you so much for getting back to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is a great catch! However, I still got the same error after updating to xmlv2. I honestly don't&amp;nbsp;understand the syntax to generate XML&amp;nbsp;with XMLMAP, and I am not sure if the data step is correct (ODM is the first table in XMLMAP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; xmlmap.ODM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ODM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 22:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391337#M277667</guid>
      <dc:creator>huyy49</dc:creator>
      <dc:date>2017-08-28T22:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create XML using XMLMAP?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391343#M277668</link>
      <description>&lt;P&gt;Try this link:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/engxml/65362/HTML/default/viewer.htm#p030dni55gms3qn1xxc7xxpzn06p.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/engxml/65362/HTML/default/viewer.htm#p030dni55gms3qn1xxc7xxpzn06p.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also simply write it out using PUT statements. Quick pseudocode:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_ ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; file 'c:\temp\test.xml' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; set ds ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; put &amp;nbsp; '&amp;lt;tag&amp;gt;' value '&amp;lt;/tag&amp;gt;'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; / '&amp;lt;tag2&amp;gt;' value2 '&amp;lt;/tag2&amp;gt;';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 22:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/391343#M277668</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-08-28T22:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create XML using XMLMAP?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/395533#M277669</link>
      <description>&lt;P&gt;Thank you for your reply! I changed to&amp;nbsp;&lt;SPAN&gt;xmlv2 but still did not work for this special case. I ended up with PUT statements.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 13:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-XML-using-XMLMAP/m-p/395533#M277669</guid>
      <dc:creator>huyy49</dc:creator>
      <dc:date>2017-09-13T13:22:56Z</dc:date>
    </item>
  </channel>
</rss>

