SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 619|回复: 1
打印 上一主题 下一主题

紧急求助

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2008-8-8 14:15:12 | 只看该作者

紧急求助

问题:现在有一文档,是xml格式
例如
<article><date>2 of 2 columns for Feb. 10, 2008</date>        <ufs>United Feature Syndicate</ufs>

</note>EDITOR For more information on pet care visit
EDITORS: Forward all mail to DR. MICHAEL FOX in care of United Feature Syndicate, 200 Madison Ave., New York, NY 10016.</note>

<title>ANIMAL DOCTOR</title>
<headline>Cats should not 'graze'</headline>
<byline>By Dr. Michael Fox</byline>
<body>DEAR DR. FOX: After reading your column in the our local paper and visiting your Web site, we have decided to wean our two 4-year-old cats from a premium dry food and start them on an organic wet food. The complication is this:
Stetson and Mavis have always eaten ad lib and prefer to graze on dry food, as well. I've been working to introduce the wet food and have been leaving them less and less dry food, feeding them frequent, small amounts of the wet food. Unfortunately, we both work during the day, so we cannot constantly check up on the cats' supply of wet food.
Do you have any suggestions about the best way to wean cats from dry to wet food? Would it be appropriate to feed them larger portions twice a day without access to the dry food that they continue to eat despite our best efforts?
Many thanks for your assistance and all you do for animals and the people who love and respect them. -- M.H.Z., Minneapolis, Minn.
I see nothing unnatural in feeding cats quality meat-based moist food (free of both cereals and vegetables) as soon as you get up and when you get home from work. Do this again mid-evening and again before you turn in for the night.

DEAR DR. FOX: This is in response to your request for reports on changing pets' diets to all-natural, whole foods.
We have had our 12-year-old chocolate Lab since he was almost 1 year old. Until about six months ago, he ate dry or canned food with some daily supplementary table scraps. After the recent pet-food recalls, I opted to eliminate processed pet food altogether.
Also, for his entire life until about five months ago, our dog had a large, firm, swollen dewclaw about the size of a thumbnail. It did not bother him, and we assumed (along with our vet) that it was just a poorly removed dewclaw.
Less than one month after turning to a whole-food diet, this dewclaw popped and drained teaspoons full of pus. The dewclaw now remains normal size with no swelling or drainage.
This is evidence of a healthier immune system. It appears that he might have slightly better muscle tone, as well. -- C.W., New York, N.Y.
DEAR C.W.: Thanks for confirming the healing power of good nutrition. I believe your conclusion that your dog's improvement is evidence of a healthier immune system is spot-on.
It is a shocking fact that both human and animal doctors, until recently, had little education in the field of nutrition during college. Nowadays, there is much more research on how nutrients can influence gene expression, disease susceptibility and neurological and cognitive development. These are exciting new frontiers, especially when coupled with growing evidence of the multiple harms caused by pesticides and other agricultural chemicals and the nutritional deficiencies of conventionally grown crops versus superior, organically grown crops. </body>

<bio>To order Dr. Michael W. Fox's newsletter, Animal Doctor, on providing the best care for your animal companion, send a check or money order for $2 and a long, self-addressed, stamped envelope to Newsletter, P.O. Box 167, Wickliffe, OH 44092. Send your questions to Dr. Fox in care of this newspaper. The volume of mail received prohibits personal replies, but questions and comments of general interest will be discussed in future columns. </bio>

<copyright>Copyright 2008, United Feature Syndicate, Inc.</copyright>
<end>END ANIMAL DOCTOR (2)                2-10-08</end></article>

怎样将其转入到sas数据集,变量名分别是date,ufs等

我试着这样做,先将其读入到一个数据集的一个变量中,然后将其各个观测相连,再对这个长的字符串匹配。
但问题是这样的,在第一步读入过程中,出现错误,丢了很多东西。

data aa;
infile "C:\Data and Projects\xml\2fx080210.xml";
length aa $600.;
input aa $ 1-600;
len=length(aa);
run;
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2008-8-11 10:35:05 | 只看该作者

Re: 紧急求助

试试SAS的XML MAPPER。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-4 22:25 , Processed in 0.097824 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表