使用StreamReader读取txt文本时候基数行读取不到?
txt文本内容如下:AU:SystolicHypertensionintheElderly'sCollaborativeGroupCoordinatingCenterTI...
txt 文本内容如下:
AU:Systolic Hypertension in the Elderly's Collaborative Group Coordinating Center
TI:Systolic hypertension in the elderly:Chinese Trial(Syst-China)-Interim report
TO:中国老年收缩期高血压临床试验阶段小结
SO:高血压临床试验阶段小结
YR:1992
VL:20
NO:5
PG:270-5
EN:
ED:
CY:
AN:
IN: 0253-3758(1992)20:5<270:zglnssqgxy>2.0.tx;1-6
AB:D: Stated to be D/B RCT//P: systolic hyperte
.
nsion//I: not clear//C: placebo//O: (1)systolic hypertension (2)diastolic pressure
DE:
PU:
AD:中国医学科学院心血管病研究所 100037
IS:0253-3758
ID:
OA:
AC:中国老年收缩期高血压临床试验协作组
SC:中华心血管病杂志
%%%%
运行结果如下:
TI:Systolic hypertension in the elderly:Chinese Trial(Syst-China)-Interim report
SO:高血压临床试验阶段小结
VL:20
PG:270-5
ED:
AN:
AB:D: Stated to be D/B RCT//P: systolic hyperte
nsion//I: not clear//C: placebo//O: (1)systolic hypertension (2)diastolic pressure
PU:
IS:0253-3758
OA:
SC:中华心血管病杂志
读取完成!
程序代码如下:
string path =Server.MapPath("CBM.txt");
if (!File.Exists(path)) {
Response.Write("需要导入数据的数据源不存在!");
return;
}
string l;
try {
System.Text.StringBuilder sb = new System.Text.StringBuilder();
using (StreamReader sr = new StreamReader(path, System.Text.Encoding.Default))
{
while ((l = sr.ReadLine()) != null)
{
Response.Write(sr.ReadLine() + "<br/>");
}
}
Response.Write("读取完成!");
}
catch (IOException ex) {
Response.Write(ex.ToString());
}
请求相应同仁帮忙看看。 展开
AU:Systolic Hypertension in the Elderly's Collaborative Group Coordinating Center
TI:Systolic hypertension in the elderly:Chinese Trial(Syst-China)-Interim report
TO:中国老年收缩期高血压临床试验阶段小结
SO:高血压临床试验阶段小结
YR:1992
VL:20
NO:5
PG:270-5
EN:
ED:
CY:
AN:
IN: 0253-3758(1992)20:5<270:zglnssqgxy>2.0.tx;1-6
AB:D: Stated to be D/B RCT//P: systolic hyperte
.
nsion//I: not clear//C: placebo//O: (1)systolic hypertension (2)diastolic pressure
DE:
PU:
AD:中国医学科学院心血管病研究所 100037
IS:0253-3758
ID:
OA:
AC:中国老年收缩期高血压临床试验协作组
SC:中华心血管病杂志
%%%%
运行结果如下:
TI:Systolic hypertension in the elderly:Chinese Trial(Syst-China)-Interim report
SO:高血压临床试验阶段小结
VL:20
PG:270-5
ED:
AN:
AB:D: Stated to be D/B RCT//P: systolic hyperte
nsion//I: not clear//C: placebo//O: (1)systolic hypertension (2)diastolic pressure
PU:
IS:0253-3758
OA:
SC:中华心血管病杂志
读取完成!
程序代码如下:
string path =Server.MapPath("CBM.txt");
if (!File.Exists(path)) {
Response.Write("需要导入数据的数据源不存在!");
return;
}
string l;
try {
System.Text.StringBuilder sb = new System.Text.StringBuilder();
using (StreamReader sr = new StreamReader(path, System.Text.Encoding.Default))
{
while ((l = sr.ReadLine()) != null)
{
Response.Write(sr.ReadLine() + "<br/>");
}
}
Response.Write("读取完成!");
}
catch (IOException ex) {
Response.Write(ex.ToString());
}
请求相应同仁帮忙看看。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询