我需要建立一个雅虎!管道,它复制item.title元素并将其添加到item.link元素的末尾。
示例输入:
<item>
<title>helloworld</title>
<link>http://www.example.com/abc</link>
</item>
<item>
<title>whatsup</title>
<link>http://www.example.com/def</link>
</item>示例输出:
<item>
<title>helloworld</title>
<link>http://www.example.com/abc?helloworld</link>
</item>
<item>
<title>whatsup</title>
<link>http://www.example.com/def?whatsup</link>
</item>发布于 2014-05-23 05:00:50
您可以使用Regex运算符,在替换模式中使用${...}符号来引用其他字段,在本例中是${title}。
item.link$- ${title}在替换参数中,我使用$来匹配item.link的末尾,在中使用 ${title}将替换为item.title的内容,从而附加到item.link的末尾。
FYI这另一个问题涉及合并两个领域的一个更普遍的情况:
https://stackoverflow.com/questions/23819948
复制相似问题