03-07-2013 08:48 PM
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.
03-08-2013 01:19 AM
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.
libname xc xml92 'c:\temp\class_def.xml';
libname xc clear;
libname xd xml92 'c:\temp\class_attr.xml'
libname xd clear;