我想将xmllint输出中的UTF-8数字引用转换为字符。
复现步骤:
$ wget http://il.srgssr.ch/integrationlayer/1.0/ue/rts/video/play/4727630.xml
$ xmllint --xpath "/Video/AssetMetadatas/AssetMetadata/title/text()" 4727630.xml && echo
Le jardin apprivoisé - Entre pierre et bois
我希望输出结果为:
Le jardin apprivoisé - Entre pierre et bois
我已阅读了man页面并尝试了不同的选项,但仍未能成功。
如果可能的话,我希望通过使用xmllint的选项来实现这一点,或者如果这不可能,使用另一个在Linux发行版中普遍找到的命令行工具。
谢谢!