[英]RegEx replace in Notepad++
I have a huge XML file and I want to do a mass replace in it. 我有一个巨大的XML文件,我想在其中进行大量替换。
The XML file looks like this: XML文件如下所示:
<xsl:if test="EVN_1_EventTypeCode">
<EVN_1_EventTypeCode>
<xsl:value-of select="EVN_1_EventTypeCode/text()" />
</EVN_1_EventTypeCode>
</xsl:if>
<EVN_2_RecordedDateTime>
<xsl:if test="EVN_2_RecordedDateTime/TS_0_TimeOfAnEvent">
<TS_0_TimeOfAnEvent>
<xsl:value-of select="EVN_2_RecordedDateTime/TS_0_TimeOfAnEvent/text()" />
</TS_0_TimeOfAnEvent>
</xsl:if>
</EVN_2_RecordedDateTime>
<xsl:for-each select="EVN_3_DateTimePlannedEvent">
<EVN_3_DateTimePlannedEvent>
<xsl:if test="TS_0_TimeOfAnEvent">
<TS_0_TimeOfAnEvent>
<xsl:value-of select="TS_0_TimeOfAnEvent/text()" />
</TS_0_TimeOfAnEvent>
</xsl:if>
</EVN_3_DateTimePlannedEvent>
</xsl:for-each>
Now I want to replace every test: 现在我要替换每个测试:
<xsl:if test='bla'>
has to become 必须成为
<xsl:if test='bla/text()'>
So as you see I want to add "/text" to every test in de xml file. 如您所见,我想在xml文件中的每个测试中添加“ / text”。
Can anyone help me? 谁能帮我?
查找内容: <xsl:if test='(.*)'>
替换为: <xsl:if test='\\1/text'>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.