本文介绍了如果条件为真,则使用xml文档复制段落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是xml文档的新手:-)希望您能为我提供帮助.以下是我的情况.

输入



i am new to xml doc stuff :-) hope u can help me. below is my scenario.

input

<fn-group>
<fn id="1"><p>For example, the <format>sixteenth-century</format> cow</p>
<p>Other new seventeenth-century cow</p>
<p>this is my text</p></fn>
<fn id="2"><p>For example, the sixteenth-century cow</p>
<p>Other new seventeenth-century cow</p>
<p>this is my text</p></fn>
<fn-group>







[condition]
if the <fn> tag contains <format> tag then the whole <fn> should be replicated right after


之后复制

预期输出:




expected output:

<fn-group>
<fn id="1"><p>For example, the <format>sixteenth-century</format> cow</p>
<p>Other new seventeenth-century cow</p>
<p>this is my text</p></fn>
<fn id="1"><p>For example, the <format>sixteenth-century</format> cow</p>
<p>Other new seventeenth-century cow</p>
<p>this is my text</p></fn>
<fn id="2"><p>For example, the sixteenth-century cow</p>
<p>Other new seventeenth-century cow</p>
<p>this is my text</p></fn>
<fn-group>



谢谢,
Chaegie



Thanks,
Chaegie

推荐答案


这篇关于如果条件为真,则使用xml文档复制段落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 16:43
查看更多