Desktop productivity for business analysts and programmers

Exporting xml as a step in the project

Reply
New Contributor
Posts: 2

Exporting xml as a step in the project

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

SAS Super FREQ
Posts: 8,820

Re: Exporting xml as a step in the project


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;

New Contributor
Posts: 2

Re: Exporting xml as a step in the project

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.

Ask a Question
Discussion stats
  • 2 replies
  • 176 views
  • 3 likes
  • 2 in conversation