提问人:valver 提问时间:2/8/2023 最后编辑:valver 更新时间:2/8/2023 访问量:41
检查 xml 文件与 excel 文件
Check a xml file vs excel file
问:
早上好
我有一个可编程逻辑控制器配置文件,如下所示:
<ConfigurationFile_Extended Features="PCOnlyUpdate">
<ConfigurationFile ModuleTypeCode="32841" ModuleMajorVersion="7" ModuleMinorVersion="3">
<Header>
<Description>7320 Configuration file</Description>
<Saved_on ConfigSuite_Version="3.105.1.0">17-Jan-23 09:22:21</Saved_on>
</Header>
<PC_Header>
<UpdateVersion>0</UpdateVersion>
</PC_Header>
<Alarms>
<Digital_Inputs>
<Digital_Input_1>
<Function Comment="Pressure Switch">21</Function>
<Action Comment="None">0</Action>
<Arming Comment="Always">1</Arming>
<Type Comment="Close to Activate">0</Type>
<Timer Comment="0s">0</Timer>
<Trip Comment="0">0</Trip>
<Return Comment="0">0</Return>
</Digital_Input_1>
<Digital_Input_2>
<Function Comment="Oil Switch">22</Function>
<Action Comment="None">0</Action>
<Arming Comment="Always">1</Arming>
<Type Comment="Close to Activate">0</Type>
<Timer Comment="0s">0</Timer>
<Trip Comment="0">0</Trip>
<Return Comment="0">0</Return>
</Digital_Input_2>
<Digital_Input_3>
<Function Comment="User Configured">0</Function>
<Action Comment="Electrical Trip">2</Action>
<Arming Comment="From Safety On">3</Arming>
<Type Comment="Close to Activate">0</Type>
<Timer Comment="0s">0</Timer>
<Trip Comment="0">0</Trip>
<Return Comment="0">0</Return>
</Digital_Input_3>
<Digital_Input_4>
<Function Comment="User Configured">0</Function>
<Action Comment="Warning">5</Action>
<Arming Comment="Never">0</Arming>
<Type Comment="Close to Activate">0</Type>
<Timer Comment="0s">0</Timer>
<Trip Comment="0">0</Trip>
<Return Comment="0">0</Return>
</Digital_Input_4>
//
<Timers>
<Warming Comment="1s">10</Warming>
<Cooling Comment="1m">600</Cooling>
<Cooling_time_at_idle Comment="0s">0</Cooling_time_at_idle>
<Sensor_Fail Comment="2.0s">20</Sensor_Fail>
</Timers>
我想编写一个程序来购买/检查带有 excel 文件的 xml 文件。
| Column A | Column B | Column C | Column D | Column F |
| Digital input 1 | Pressure Switch| None | Always | Close to Active |
| Digital input 2 | Oil Switch | None | Always | Close to Active |
| Digital input 3 | ....
| Digital input 4 | ....
| Digital input 5 | ....
| Digital output 1 | ....
| Digital output 2 | ....
| Digital output 3 | ....
同样在 excel 文件中,我有计时器的值
考虑到我是初学者,
- 这样做最合适的语言是什么?最简单的?
- 我应该从哪里开始学习/阅读?
- 下一步是写入这些数字输入/输出和定时器。
- 文件有 17128 行代码,这是个问题吗?
我读过 C:XmlDiff 和 Java:XMLUnit 的库
但是比较XML文件,我需要检查属性的名称和值。
答: 暂无答案
评论