【发布时间】:2021-01-02 09:08:05
【问题描述】:
以下数据为xml文件。 这里actual,msg,time,type是属性。
<properties>
<inputs>
<action actual="0xAB" msg="GENERAL.GROUPING.TAG" time="00:00:00.825" type="SET" />
<action actual="0xCD" msg="GENERAL.GROUPING.LENGTH" time="00:00:00.826" type="SET" />
<action actual="0xEF" msg="GENERAL.GROUPING.TRANSACTION_ID" time="00:00:00.826" type="SET" />
<action actual="0xGH" msg="GENERAL.GROUPING.ORIGINATOR_SYSTEM_TITLE" time="00:00:00.827" type="SET" />
<action actual="0xIJ" msg="GENERAL.GROUPING.VALUE" time="00:00:00.827" type="SET" />
<action actual="0xKL" msg="GENERAL.GROUPING.TITLE.LENGTH" time="00:00:00.827" type="SET" />
<action actual="0xMN" msg="GENERAL.GROUPING.TITLE.VALUE" time="00:00:00.828" type="SET" />
<action actual="0xOP" msg="GENERAL.GROUPING.DATE" time="00:00:00.828" type="SET" />
</inputs>
</properties>
当属性msg="GENERAL.GROUPING.TAG" 时,我想返回actual="0xAB" 的属性值。
所以根据属性'msg'值我想打印属性'实际'值
请通过示例帮助解决此问题。
【问题讨论】:
-
到目前为止您尝试了什么,您可以将其添加到问题中吗?
标签: xml xpath robotframework