全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
5847 5
2010-04-16
最近需要用SAS处理XML FILE,以下的CODE可以读进数据,但是只能读到CR这个TAG的下一层中的变量,比如VAR A, VAR B, VAR, C,但是其实VAR A下面还有一层,还有两个变量,就无法读出来了。大家有办法么???

libname in xml 'C:\Documents and Settings\TMP\Desktop\TRY_NEW.xml';
data tem;
set in.CR;
RUN;

另外,看上网说,可以用SAS XML MAPPER,我也试了,问题是,连OPEN XML FILE都无法打开,出现这个提示:说是: XMLMAP PARSER ENCOUNTERED XML ERROR。但是这个XML FILE就是我上面用简单的CODE可以成功读的FILE。

实在不知道问题在哪里

有了解的人么?

多谢了!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-4-16 04:50:49
If it is a table saved in xml format, you can simply use libname xml engine to input the table into SAS platform as your code. But if the xml file includes other explanation information, you have to use xlmmap.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-4-16 20:15:37
2# HRI

ur rite. and it is a lit bit more complicated structure (each obs to be read into SAS is not always appear within a second-level element, and thats why the code i provided above could only read those obs in the second-level, while losing all others in the third-level. But my question is that, I even can not open xml file in SAS XML MAPPER. I was very curious since I can read it by the simple code, so Im assuming it should be of the rite xml format.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-5-4 13:26:44
3q
学习了一下
请问如何把SAS结果保存为XML格式呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-11-14 13:15:40
libname myfiles 'C:\Users\Desktop\测试' ;
libname myxml xml 'C:\Users\Desktop\测试\Singers.xml' ;
data myxml.singers;
set sashelp.class;
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-3-19 18:18:50
用 SAS  XML MAPPER读取数据的时候,可以不可以指定读取某几个变量?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群