【问题标题】:How can i uncomment a XML tag in eggplant如何取消注释茄子中的 XML 标记
【发布时间】:2020-01-14 18:52:24
【问题描述】:
typetext controlkey,a
typetext controlkey,c
put remoteclipboard(5) as a tree into myTree
put item 4 of myTree into a
delete every occurrence of "<!--" from a
log a

我的变量 a 将有一个 XML 标记(已注释)值,我正在尝试取消注释 XMl 标记。

【问题讨论】:

  • 我的变量 a 将包含
  • 现在运行代码时发生了什么?就不能像删除开头的评论标志一样把XML评论的另一边删掉吗?

标签: eggplant


【解决方案1】:

当您删除 cmets 时,将 XML 视为文本可能比将其变成树更容易。使用带有delete 命令的模式,如下所示:

delete every occurrence of <"<!--" then some characters then "-->"> in myXml

【讨论】:

    猜你喜欢
    • 2019-02-21
    • 1970-01-01
    • 2011-02-14
    • 2015-09-19
    • 1970-01-01
    • 2023-02-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-27
    相关资源
    最近更新 更多