Usage Note 23662: With ODS MARKUP, how can I display the XML file formatted in the browser and not show the XML tags?
To format the XML file in the browser, apply an XSL stylesheet. Otherwise, it will simply show the XML tags,
which is great for moving the data but not for viewing it. To generate this XSL stylesheet, use the CODE= option
on the ODS MARKUP statement. To apply the XSL style sheet, modify the default tagset event to include this association.
proc template;
define tagset tagsets.test;
parent=tagsets.default;
define event code_stylesheet_link;
putq "<LINK REL=""STYLESHEET"" HREF=" url " />" NL /if
exists(url);
end;
define event doc;
start:
put "<?xml version=""1.0""";
putq " encoding=" encoding;
put "?>" NL NL;
put '<?xml-stylesheet type="text/xsl" href="formatting.xsl"?>' ;
put "<odsxml>" NL;
finish:
put "</odsxml>" NL;
end;
end;
run;
ods markup file='temp.xml'
code='formatting.xsl'
tagset=tagsets.test;
proc print data=sashelp.class;
run;
ods markup close;
ods markup close;
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2007-08-28 14:34:37 |
Date Created: | 2004-01-13 10:34:55 |