Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用长度和结束标记读取R中的XML数据问题_R_Xml_Xml Parsing_Lapply - Fatal编程技术网

用长度和结束标记读取R中的XML数据问题

用长度和结束标记读取R中的XML数据问题,r,xml,xml-parsing,lapply,R,Xml,Xml Parsing,Lapply,我得到了一个行内XML数据表,如下所示: 尝试读取一行XML时,出现以下错误: > ax1 <- xmlParse(a1$FILE_DATA[[1]], asText = TRUE) Premature end of data in tag PDFREPORT1 line 3 Premature end of data in tag PDFREPORT line 3 Premature end of data in tag PDFREPORTs line 3 Premature e

我得到了一个行内XML数据表,如下所示:

尝试读取一行XML时,出现以下错误:

> ax1 <- xmlParse(a1$FILE_DATA[[1]], asText = TRUE)
Premature end of data in tag PDFREPORT1 line 3
Premature end of data in tag PDFREPORT line 3
Premature end of data in tag PDFREPORTs line 3
Premature end of data in tag REPORT line 1
Error: 1: Premature end of data in tag PDFREPORT1 line 3
2: Premature end of data in tag PDFREPORT line 3
3: Premature end of data in tag PDFREPORTs line 3
4: Premature end of data in tag REPORT line 1
>ax1 ax1
a1$filedata <- sub("<PDFREPORT1>.*</PDFREPORT1>", "", a1$FILE_DATA)
> ax1 <- xmlParse(a1$filedata[[1]], asText = TRUE)
Premature end of data in tag PDFREPORT1 line 3
Premature end of data in tag PDFREPORT line 3
Premature end of data in tag PDFREPORTs line 3
Premature end of data in tag REPORT line 1
Error: 1: Premature end of data in tag PDFREPORT1 line 3
2: Premature end of data in tag PDFREPORT line 3
3: Premature end of data in tag PDFREPORTs line 3
4: Premature end of data in tag REPORT line 1