0

2 つの大きな xml ファイルをマージし、IP アドレスなどの一意の要素を 1 つリストする必要があります。一意性は、タグ名、ステータス、およびタイプに由来します。

入力ファイル 1:-

- <network>
- <node>
  <id>11</id> 
  <name>aaa.com</name> 
  <status>active</status> 
  <ip>1.1.1.1</ip> 
  <type>Windows</type>
  </node>
- <node>
  <id>12</id> 
  <name>bbb.com</name> 
  <status>active</status> 
  <ip>2.2.2.2</ip> 
  <type>Unix</type>
  </node>

入力ファイル 2:-

- <network>
- <node>
  <id>21</id> 
  <name>aaa.com</name> 
  <status>active</status> 
  <ip>1.1.1.1</ip> 
  <type>Windows</type>
  </node>
- <node>
  <id>22</id> 
  <name>ccc.com</name> 
  <status>active</status> 
  <ip>3.3.3.3</ip> 
  <type>Unix</type>
  </node>
  </network>

============= 出力は、タイプに基づくアクティブな IP アドレスのリストでなければなりません

何かのようなもの:

Windows.txt
1.1.1.1

Unix.txt
2.2.2.2
3.3.3.3
4

0 に答える 0