我有XML文件。我希望在XML文件被更改后包含任何节点时获取XML文件的节点ID。
如果我有XML文件的示例如下:
<servicestatuslist>
<servicestatus id='4693209'>
<instance_id>1</instance_id>
<service_id>6901</service_id>
<host_id>5625</host_id>
<host_name>host1</host_name>
<name>battery_status</name>
</servicestatus>
<servicestatus id='4693200'>
<instance_id>1</instance_id>
<service_id>6901</service_id>
<host_id>5625</host_id>
<host_name>host2</host_name>
<name>battery_status</name>
</servicestatus>
<servicestatus id='4693201'>
<instance_id>1</instance_id>
<service_id>6901</service_id>
<host_id>5625</host_id>
<host_name>host3</host_name>
<name>battery_status</name>
</servicestatus>
</servicestatuslist>
示例:if&#34; host_name&#34; host1更改为hostxxx然后我可以获得&#34; servicestatus id&#34;已更改节点