从多个XML文件中提取节点 [英] Extracting Nodes from multiple xml files

查看:199
本文介绍了从多个XML文件中提取节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有类似结构的三个XML文件,我想使用XPath-EX pression提取所有匹配的节点在这些文件,并将其写入THRID之一。

你知道一个很好的工具来处理呢?

我喜欢

想着什么

  $ supermagicxpathtool -x// whoopdeefile1.xml file2.xml file3.xml> resultfile.xml


解决方案

xmlstarlet 可以提取节点,但我不能肯定它可以加入结果这样。

I have three xml files of similar structure and I would like to use an xpath-expression to extract all matching nodes in these files and write them to a thrid one.

Do you know a good tool to handle this?

I am thinking of something like

$supermagicxpathtool -x "//whoopdee" file1.xml file2.xml file3.xml > resultfile.xml

解决方案

xmlstarlet can extract the nodes, but I'm not certain that it can join the results like that.

这篇关于从多个XML文件中提取节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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