The SAS Output Delivery System and reporting techniques

having problem in importing HTML report

Reply
N/A
Posts: 0

having problem in importing HTML report

Hi to all,
I have a html report which is in megabytes that makes impossible to view using IE.
So,i want to create a sas dataset from that html report .I tried using XML engine to import the html report but somehow it doesn't like it.The following is the code i used.I know i am missing something,but i am not able to find what it is.
Also,my question Is it possible to create a sas dataset from html file.?. If possible please explain how?.
Thanks a lot.
Please help!!!!!!!!!!.
Thanks.

libname xml xml "/pii/saspii/pii/Daily/daily_bigrun100.Html";
libname one "/pii/saspii/pii_testfiles/testbig";

data xml.PIIT;
set sashelp.class;
run;

data _class_;
set PIIT;
run;

proc print ;
run; Message was edited by: kgunase
SAS Super FREQ
Posts: 8,743

Re: having problem in importing HTML report

Hi:
HTML is not XML -- yes, they are both "related" to SGML -- but they are more like distant cousins, than brothers. They are not interchangeable file types. A browser will open and render an XML file, only if the XML file contains an XML processing instruction for a CSS file or an XSL file.

The XML Libname engine is meant to be used on non-hierarchical XML data files. It would not be the appropriate technique to use to read an HTML table into a SAS dataset.

You can use the URL access method on the FILENAME statement to read an HTML file from a web site:
http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000223242.htm
http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a001282569.htm

Depending on what is in your HTML file, however, (if there are a lot of IMG tags or embedded JavaScript), you might need to work with Tech Support because the URL access method is meant to open an HTML file from a web site, using either the HTTP or HTTPS protocol.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 119 views
  • 0 likes
  • 2 in conversation