<?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 XML output Using Customized Tagset in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11385#M3076</link>
    <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
Thank you in Advance. &lt;BR /&gt;
I am ceating a customized tagset to generate xml output which is as follows &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;STORE&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;HEADER version="1.0" datecreated="2011-06-10" timecreated="14:59:03" comments="&amp;lt;br"&gt;
&lt;BR /&gt;
&lt;OBJECTS count="1"&gt;&lt;BR /&gt;
  &lt;OBJECTS&gt;&lt;BR /&gt;
    &lt;DOCUMENTS count="1"&gt;&lt;BR /&gt;
       &lt;DOCUMENT doc="" ref="&amp;lt;br"&gt;
       &lt;/DOCUMENT&gt;&lt;BR /&gt;
&lt;BR /&gt;
   &lt;FIELD count="4"&gt;&lt;BR /&gt;
      &lt;FIELD name="CARRIER" value="03"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
      &lt;FIELD name="DIVISION" value="0100050003"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
      &lt;FIELD name="PMON" value="102010"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
      &lt;FIELD name="MED_CM" value="288"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
         &lt;/FIELD&gt;&lt;BR /&gt;
&lt;BR /&gt;
        &lt;/DOCUMENTS&gt;&lt;BR /&gt;
     &lt;/OBJECTS&gt;&lt;BR /&gt;
&lt;/OBJECTS&gt;&lt;BR /&gt;
In the above code  Object count = 1 i am using a default value 1 for the row count, i tried to increment the count value other than the default value but it didn't work.&lt;BR /&gt;
I am using the below proc template to generate the above xml :&lt;BR /&gt;
Further is there any way to reference the destination file path in the xml.&lt;/HEADER&gt;&lt;/STORE&gt;</description>
    <pubDate>Fri, 10 Jun 2011 22:11:24 GMT</pubDate>
    <dc:creator>hari1109</dc:creator>
    <dc:date>2011-06-10T22:11:24Z</dc:date>
    <item>
      <title>XML output Using Customized Tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11385#M3076</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
Thank you in Advance. &lt;BR /&gt;
I am ceating a customized tagset to generate xml output which is as follows &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;STORE&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;HEADER version="1.0" datecreated="2011-06-10" timecreated="14:59:03" comments="&amp;lt;br"&gt;
&lt;BR /&gt;
&lt;OBJECTS count="1"&gt;&lt;BR /&gt;
  &lt;OBJECTS&gt;&lt;BR /&gt;
    &lt;DOCUMENTS count="1"&gt;&lt;BR /&gt;
       &lt;DOCUMENT doc="" ref="&amp;lt;br"&gt;
       &lt;/DOCUMENT&gt;&lt;BR /&gt;
&lt;BR /&gt;
   &lt;FIELD count="4"&gt;&lt;BR /&gt;
      &lt;FIELD name="CARRIER" value="03"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
      &lt;FIELD name="DIVISION" value="0100050003"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
      &lt;FIELD name="PMON" value="102010"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
      &lt;FIELD name="MED_CM" value="288"&gt;&lt;/FIELD&gt;&lt;BR /&gt;
         &lt;/FIELD&gt;&lt;BR /&gt;
&lt;BR /&gt;
        &lt;/DOCUMENTS&gt;&lt;BR /&gt;
     &lt;/OBJECTS&gt;&lt;BR /&gt;
&lt;/OBJECTS&gt;&lt;BR /&gt;
In the above code  Object count = 1 i am using a default value 1 for the row count, i tried to increment the count value other than the default value but it didn't work.&lt;BR /&gt;
I am using the below proc template to generate the above xml :&lt;BR /&gt;
Further is there any way to reference the destination file path in the xml.&lt;/HEADER&gt;&lt;/STORE&gt;</description>
      <pubDate>Fri, 10 Jun 2011 22:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11385#M3076</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-06-10T22:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: XML output Using Customized Tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11386#M3077</link>
      <description>code i am using to generate xml :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
define event EmitMeta; &lt;BR /&gt;
      start:&lt;BR /&gt;
         put '&amp;lt;' $LIBRARYNAME '&amp;gt;' CR CR ;&lt;BR /&gt;
         putq '&amp;lt;' "Header Version =" '"' 1.0 '"' ' ' "Datecreated="  DATE  ' ' "Timecreated=" TIME  ' ' "Author="  AUTHOR "Comments="  nl nl;&lt;BR /&gt;
		 putq   '&amp;lt;' "Knowledgeobjects count=" '"' 1 '"' '&amp;gt;' nl;&lt;BR /&gt;
		 put   '  ' '&amp;lt;' "Knowledgeobjects" '&amp;gt;' nl ;&lt;BR /&gt;
		 put   '    '   '&amp;lt;' "KnowledgeDocuments Count=" '"' 1 '"' '&amp;gt;' nl;&lt;BR /&gt;
		 putq  '       '   '&amp;lt;' "Knowledge Document Doc Ref=" nl;&lt;BR /&gt;
		 put   '       ' '' nl nl;&lt;BR /&gt;
         break;&lt;BR /&gt;
      finish:&lt;BR /&gt;
	     put  '        '    '' nl ;  &lt;BR /&gt;
	     put  '     '       '' nl ;&lt;BR /&gt;
         put  '' ;&lt;BR /&gt;
         break;&lt;BR /&gt;
      end;&lt;BR /&gt;
      &lt;BR /&gt;
      define event EmitRow; &lt;BR /&gt;
         ndent;&lt;BR /&gt;
         putq '&lt;FIELD count=" COLCOUNT "&gt;' nl ;&lt;BR /&gt;
         ndent;&lt;BR /&gt;
       &lt;BR /&gt;
         eval $index  1;&lt;BR /&gt;
         iterate $col_names ;&lt;BR /&gt;
         do /while _value_;&lt;BR /&gt;
            set $name  _value_ ; trigger EmitCol;&lt;BR /&gt;
            next $col_names;&lt;BR /&gt;
            eval $index $index+1;&lt;BR /&gt;
			done; &lt;BR /&gt;
&lt;BR /&gt;
         xdent;&lt;BR /&gt;
         put "&lt;/FIELD&gt;" nl nl;&lt;BR /&gt;
         xdent;&lt;BR /&gt;
         break;&lt;BR /&gt;
      end;&lt;BR /&gt;
            &lt;BR /&gt;
      define event EmitCol; &lt;BR /&gt;
         unset $value;&lt;BR /&gt;
         set $value $col_values[$name];&lt;BR /&gt;
         putq '&lt;FIELD name="  $name;&amp;lt;br&amp;gt;
		 put " value=";&amp;lt;br&amp;gt;
         putq  $value;&amp;lt;br&amp;gt;
         put "&gt;&lt;/FIELD&gt;' nl ;&lt;BR /&gt;
         break;&lt;BR /&gt;
      end;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
      <pubDate>Fri, 10 Jun 2011 22:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11386#M3077</guid>
      <dc:creator>hari1109</dc:creator>
      <dc:date>2011-06-10T22:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: XML output Using Customized Tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11387#M3078</link>
      <description>Hi:&lt;BR /&gt;
  I am guessing that the code snippet we see is not the complete code you are using. When any code you post has &amp;lt; or &amp;gt; symbols, the forum posting software frequently truncates the post because it tries to interpret the &amp;lt; and &amp;gt; as HTML tags.&lt;BR /&gt;
&lt;BR /&gt;
  The way around it is to use &amp;amp;lt; or &amp;amp;gt; (ampersand-lt-semicolon or ampersand-gt-semicolon) for purposes of posting the code.&lt;BR /&gt;
&lt;BR /&gt;
  However, before you go to all that effort to modify your code, your best bet is to open a ticket with Tech Support and provide them information or code about:&lt;BR /&gt;
1) how are you invoking the tagset template: SAS XML Libname Engine or as ODS TAGSETS.?????? invocation. The method by which you invoke the tagset template does make a difference because the events could be different if generated for procedure output versus generated for data.&lt;BR /&gt;
  &lt;BR /&gt;
2) provide them with a sample copy of the SAS data set which is input to your process&lt;BR /&gt;
  &lt;BR /&gt;
3) provide them with a good copy of the XML you need to replicate&lt;BR /&gt;
&lt;BR /&gt;
4) provide them the code you plan/want to use to invoke the tagset template.&lt;BR /&gt;
&lt;BR /&gt;
I believe the solution for the counter issue will depend on how your count gets incremented. It will depend on where the incrementing is happening - -if it happens within the tagset template process, then you will need an event to trigger the incrementing of the variable. If it happens within a DATA step program, then you will likely need to retain the counter variable across iterations of the DATA step.&lt;BR /&gt;
&lt;BR /&gt;
Tech Support is your best resource for help on this front.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 11 Jun 2011 02:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/XML-output-Using-Customized-Tagset/m-p/11387#M3078</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-06-11T02:55:52Z</dc:date>
    </item>
  </channel>
</rss>

