![](/img/trans.png)
[英]Is there a Linux command line tool sequence for converting XML files into a single HTML file?
[英]Error when converting XML to CSV in command line
我試圖在 Linux 目錄中找到所有.xml
文件,並將它們轉換為.csv
:
find . -name "*xml" -execdir sh -c 'xsltproc -o "${0%.xml}.csv" opv.xsl "$0"' {} \;
但出現以下錯誤:
warning: failed to load external entity "opv.xsl"
cannot parse opv.xsl
我已經通過 conda conda install -c anaconda libxslt
安裝了xsltproc
package 。
我相信您想使用-exec
而不是-execdir
。 不同之處在於-execdir
在包含每個找到的文件的目錄中執行命令,但這些目錄不會包含您的樣式表。 或者,提供樣式表文件的完整路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.