|
There is -- you can use the libname XML statement to read this in, but
you need an associated .map file to tell the XML engine the data layout.
Do you have 'SAS XML Mapper' installed? If so, you can take a sample
.xml file and use that and the app to create an appropriate map file.
I'll assume you don't have it handy right yet and whip one out and send
it back to you -- takes about 5min...
Matt
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Eli
Kling
Sent: Wednesday, October 28, 2009 5:40 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: reading in XML data
I am having trouble reading an xml file I got from a client (well I
have 50 of them). Before I go to the good old data step and parse it
myself, I wonder if there is an elegant way of doing this. The
structure is a follows:
<?xml version="1."?>
<test>
<frame value="1">
<node name="node1">
<attribute name="a1" value="1"></attribute>
<attribute name="a2" value="0"></attribute>
<attribute name="a3" value="0"></attribute>
<attribute name="a4" value="0"></attribute>
<attribute name="a5"
value="4.681483335"></attribute>
<attribute name="a6"
value="1.870251177"></attribute>
<attribute name="a7"
value="7.635592512"></attribute>
<attribute name="a8" value="1"></attribute>
<attribute name="a9" value="1"></attribute>
<attribute name="a10" value="1"></attribute>
</node>
<node name="node2">
<attribute name="a1" value="1"></attribute>
<attribute name="a2"
value="-0.009869254665"></attribute>
<attribute name="a20"
value="0.03694603221"></attribute>
<attribute name="a21"
value="0.1336173431"></attribute>
<attribute name="a6" value="0"></attribute>
<attribute name="a10" value="0"></attribute>
<attribute name="a17" value="0"></attribute>
<attribute name="a50" value="1"></attribute>
<attribute name="a55" value="1"></attribute>
<attribute name="a56" value="1"></attribute>
</node>
Yes, each node has its own attributes where some are shared - but this
is probably a read hering.
|