I would suggest 2 possible approaches:
1. Download the trial version of XMLSpy and do the conversion. www.altova.com
2. Instead of using one of the languages suggested below, I would look at using a .net based language due to .net's incredible support for xml. For example, here are the statements (C#) to read an XML file into memory :
DataSet ds=new DataSet() ;
If you need a complete program, let me know.
"Bridging SAS and Microsoft Technologies"?
Kevin Christensen wrote:
> SAS-L Index - 15 Dec 2004 - Special issue (#2004-1651)I have a rather
> concatenated XML file that I would like to read into SAS. I have
> XML Libname but it didn't work because the XML file relies on DTD. I
> tried using XMLMap but got an error when trying to open the file in
> I'm not sure why I got that error. I have the dtd file. Is there a
> use the dtd file and somehow easily convert the XML file into a sas
I think the DTD is likely to defeat you here. SAS is still working to
get its XML act together.
I would recommend that you tackle this in another language, just to
save yourself headaches. Perl, Python, Java, _et_al._ have good
XML reading capabilities. If you do this in Perl, just grab a good
XML module like XML::Parser and let the imported functions do the
rest. Here's an article I read recently which might help you if you
want to play with XML (using Perl) from the command line (which means
you have a STDOUT which can be piped right into a SAS DATA step if you
David Cassell, CSC
Senior computing specialist