XBRL包"fileFromCache(file)中的错误" [英] XBRL package "Error in fileFromCache(file)"

查看:114
本文介绍了XBRL包"fileFromCache(file)中的错误"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用R XBRL软件包读取此xbrl文件...

I'm trying to read this xbrl file with R XBRL package...

https://www.cnmv.es/Portal/Consultas/wuc/DescargaXBRLIPP.ashx?t={77853e69-5deb-4bd5-acd4-3fb4715e2664}

...但是当我下载文件并运行代码

...but when I download the file and run the code

xbrl.vars <- xbrlDoAll(inst, verbose=TRUE)

我收到此错误:

XBRL :: xbrlParse(file)中的错误:
./ipp-enc-ind-2005-06-30.xsd./ipp-enc-con-2005-06-30.xsd不存在.正在中止.

error in XBRL::xbrlParse(file) :
./ipp-enc-ind-2005-06-30.xsd./ipp-enc-con-2005-06-30.xsd does not exists. Aborting.

我认为该错误是.xsd文件的ULR问题.是否可以在本地目录中下载xsd文件并使用它们读取.XBRL文件?怎么做到呢?

I suppose that the error is a problem with the ULR of the .xsd file. Is it possible to download the xsd files in a local directory and use them to read the .XBRL file? How can it be done?

推荐答案

您可以从

You can download a zip of the schemas from https://www.xbrl.es/informacion/ipp.html. After trying to parse the xbrl file using these, still got errors as there were still a few other files that were required. After downloading these, it does seem to parse, with warnings! I don't know if there is a more standard way to get these extra files, rather than one by one.

下载内容

# directory for files
dir.create("SOtemp")

# schemas
download.file("http://www.cnmv.es/IPP/taxonomia/2005-06-30/ipp_2005-06-30_v1.22.zip", "SOtemp/scheme.zip")
unzip("SOtemp/scheme.zip", exdir="SOtemp/")

# file
pth = "https://www.cnmv.es/Portal/Consultas/wuc/DescargaXBRLIPP.ashx?t=%7B77853e69-5deb-4bd5-acd4-3fb4715e2664%7D"
download.file(pth, destfile="SOtemp/2005-06-30/testSO.xml")


# extra stuffs that needed downloaded -- from R error messages
morePths <-c("https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
             "https://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
             "www.xbrl.org/2003/xl-2003-12-31.xsd",
             "https://docs.oasis-open.org/emergency/edxl-have/cs01/xlink-2003-12-31.xsd")                 
mapply(download.file, morePths, destfile=file.path("SOtemp", "2005-06-30", basename(morePths)))

现在解析

library(XBRL)
out <- xbrlDoAll("SOtemp/2005-06-30/testSO.xml", cache.dir="naughtyCache/", prefix.out=NULL, verbose=TRUE)

这篇关于XBRL包"fileFromCache(file)中的错误"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆