BookmarkSubscribeRSS Feed
ACarroll
Calcite | Level 5

Hi,

Hopefully someone is able to help me.

Currently we provide stats online regarding median house prices. We use Enterprise Guide to extract and maipulate the data into a summary table before its copied and pasted into excel. Then charts are manually created/updated and saved as jpegs so they can be put online. We'd like to automate this process and the web content team is keen to purchase a FusionChart license.

I know I can export then save the sumamry table as a xml file, however we'd like to automate the whole process so that the data is sent to a location every month and the web content guys can update the website. Can I export to xml as a step in the project? The only listed options are for srx, html and pdf.

I'm still a noob with SAS so dont know any coding but if someone is able to help that would be most appreciated.

Let me know if any more details are required.


Cheers,

Adrian

2 REPLIES 2
Cynthia_sas
SAS Super FREQ


Hi,

  There's not just one form of XML. In fact, the .srx file is SASReport XML, such as created by SAS and EG and various BI clients, is an XML format consumed by SAS clients and then rendered as needed by the client application. There are a lot of different XML formats, there's Excel 2003 XML, there's MusicML, JusticeML, XBRL, ChemML, etc, etc. So, you have to know what -kind- of XML you need to produce. Then you have to see whether the kind of XML that you need to produce is one of the "standard" XML tagset templates that are used for the SAS XML Libname Engine or whether you need to modify an existing tagset template to generate the form of XML you need. SAS will create very "regular" XML without a lot of hierarchical levels. The code below shows 2 examples of using the SAS XML Libname Engine to write part of a SAS dataset to 2 different XML files: in one the variable names become the element or tag names and in the other, the variable names and variable values become tag attributes. (look at the XML files in Notepad after they've been created)

  If you need different type of XML or if you need a report format instead of a data format, then you will have to investigate how to make that happen. If your next process (the web process) hasn't been written yet, perhaps it can consume the default types of XML that SAS can create.

  I believe you will have to use code for this. I don't think there's a task or wizard to do this.

cynthia

libname xc xml92 'c:\temp\class_def.xml';

data xc.class;

  set sashelp.class(obs=3);

run;

libname xc clear;

  

libname xd xml92 'c:\temp\class_attr.xml'

        xmldataform=attribute;

 

data xd.class;

  set sashelp.class(obs=3);

run;

libname xd clear;

ACarroll
Calcite | Level 5

Thanks Cynthia - much appreciated.

Most of that is over my head but I'll talk to a few ppl here and am waiting on some info from the wb team.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 756 views
  • 3 likes
  • 2 in conversation