【发布时间】:2014-09-26 06:29:09
【问题描述】:
我是 XML 新手。 我从谷歌驱动器下载了一个名为 ipg140722 的 XML 文件,http://www.google.com/googlebooks/uspto-patents-grants-text.html , 我用的是 Window 8.1, R 3.1.1,
library(XML)
url<- "E:\\clouddownload\\R-download\\ipg140722.xml"
indata<- xmlTreeParse(url)
XML declaration allowed only at the start of the document
Extra content at the end of the document
error: 1: XML declaration allowed only at the start of the document
2: Extra content at the end of the document
what is the problem
【问题讨论】:
-
如果没有看到文档,您当然不能指望我们帮助您??将其上传到某处并在您的问题中提供一个链接。
-
我猜它来自here,在Linux 上解压缩的内容
grep -c "xml version" ipg140722.xml有6984 个XML 文档。再次在 linux 上,可以使用 awk 到 break these into separate files,但可能是时候问一下意图是什么了?
标签: r xml-parsing