Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.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
Groovy 从多个节点生成xml文件_Groovy_Opentext - Fatal编程技术网

Groovy 从多个节点生成xml文件

Groovy 从多个节点生成xml文件,groovy,opentext,Groovy,Opentext,在content server上,我正在运行以下内容脚本(groovy): List var1=docman.getFolder(129335.getChildren)() 日志错误(“开始”) 用于(CSNode x:var1){ sendFile(admin.exportXml(x.content) } 我希望它创建的xml与id=129335的文件夹中的文件夹数量相同,但它只创建一个xml。 我想修改它以创建一个唯一的xml文件,其中xml对应于 各种文件夹。我怀疑服务器上执行的send

在content server上,我正在运行以下内容脚本(groovy):

List var1=docman.getFolder(129335.getChildren)()
日志错误(“开始”)
用于(CSNode x:var1){
sendFile(admin.exportXml(x.content)
}
我希望它创建的xml与id=129335的文件夹中的文件夹数量相同,但它只创建一个xml。 我想修改它以创建一个唯一的xml文件,其中xml对应于
各种文件夹。我怀疑服务器上执行的sendFile语句只能是一个。

问题是什么?脚本在第一个for循环中只创建一个xml,而没有包含的目录那么多。请检查
sendFile
函数。如果不提供上下文/详细信息,您将无法获得答案。。
List<CSNode> var1 = docman.getFolder(129335).getChildren()
log.error("start")
for(CSNode x : var1){
sendFile(admin.exportXml(x).content)
}