使用xmlstarlet将XML从一个文件插入另一个文件? [英] Insert XML from one file into another with xmlstarlet?

查看:70
本文介绍了使用xmlstarlet将XML从一个文件插入另一个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以使用xmlstarlet将XML从一个文件插入另一个文件,或者我是否一直将一堆-s命令串在一起?我要插入一个很大的块.我会最好编写一些带有该块的xsl吗?

Is there a way to insert XML from one file into another using xmlstarlet or am I stuck stringing together a bunch of -s commands? I have a fairly large chunk to insert. Would I be better off writing some xsl with that chunk in it?

推荐答案

我最好写一些带有该块的xsl吗?

Would I be better off writing some xsl with that chunk in it?

我认为您最好使用XSL; document()函数可让您从另一个文件获取XML.xmlstarlet的ed子命令无权访问 document(),它缺少一种方法访问其他文件.

I think you would be better off using XSL; the document() function lets you get XML from another file. xmlstarlet's ed subcommand doesn't have access to document() and it lacks a way of accessing other files.

这篇关于使用xmlstarlet将XML从一个文件插入另一个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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