Hallo zusammen,
ich versuche gerade folgdendes zu implementieren.
Ich möchte zwei Dateien miteinandervergleichen die so aussehen:
.
.
.
<event>
<attribute type="TESTACTIONS-TACT_ID">27568</attribute>
<attribute type="TESTACTIONS-TACT_TCASE_ID">10660</attribute>
<attribute type="TESTACTIONS-TACT_TEST_JAVA_ID">JRE_13103</attribute>
<attribute type="PROTOCOLS-PRC_ID">24310</attribute>
<attribute type="TESTACTIONS-TACT_ENV_ID">1164</attribute>
<attribute type="TESTACTIONS-TACT_REL_ID">271</attribute>
<attribute type="TESTACTIONS-TACT_TESTER_USR_ID_2">MIKN</attribute>
<attribute type="TESTACTIONS-TACT_QAT_ID">23</attribute>
<attribute type="TESTACTIONS-TACT_TOBJ_ID">3771</attribute>
<attribute type="PROTOCOLS-PRC_PROTOCOLTYP_ID">N</attribute>
<attribute type="PROTOCOLS-PRC_TACT_ID">27568</attribute>
<attribute type="TESTACTIONS-TACT_COMP_ID">3771</attribute>
<attribute type="TESTACTIONS-TACT_SEV_ID">0</attribute>
<attribute type="PROTOCOLS-PRC_USR_ID">MIKN </attribute>
<attribute type="TESTACTIONS-TACT_REV_ID">99</attribute>
<attribute type="TESTACTIONS-TACT_TESTER_USR_ID">MIKN</attribute>
<attribute type="TESTACTIONS-TACT_TDATE">16.09.2004</attribute>
<attribute type="TESTACTIONS-TACT_DEV_REL_ID">271</attribute>
<attribute type="TESTACTIONS-TACT_TEST_DBV_ID">ORA9R2_EE </attribute>
<attribute type="PROTOCOLS-PRC_USRROLE_ID">QPV </attribute>
<attribute type="PROTOCOLS-PRC_DATE">16.09.2004</attribute>
<attribute type="TESTACTIONS-TACT_TEST_BNR_ID">b1001_csvext </attribute>
</event>
.
.
.
Leider ist in beiden Dateien die Reihenfolge der Events unterschiedlich. Im ersten Schritt gehe ich hin und zähle in beiden Dateien die Anzahl der Events und vergleiche diese miteinander. Das geht schon. Im zweiten Schritt möchte ich nun mit dem Attribut "PROTOCOLS-PRC_ID" über die Dateien laufen. Sobald dies gefunden worden ist, will ich nun alle Attribute die in diesem Eventblock stehen in einem Array speichern. Das mache ich mit beiden Dateien.
Nun zu meinem Problem. Wie ich nach dem Attribut "PROTOCOLS-PRC_ID" suche weiss ich, aber wie bekomme ich nun die Attribute dieses Blockes in das Array ? Es stehen ja welche darüber und welche darunter.
Danke und Gruß
Michael
ich versuche gerade folgdendes zu implementieren.
Ich möchte zwei Dateien miteinandervergleichen die so aussehen:
.
.
.
<event>
<attribute type="TESTACTIONS-TACT_ID">27568</attribute>
<attribute type="TESTACTIONS-TACT_TCASE_ID">10660</attribute>
<attribute type="TESTACTIONS-TACT_TEST_JAVA_ID">JRE_13103</attribute>
<attribute type="PROTOCOLS-PRC_ID">24310</attribute>
<attribute type="TESTACTIONS-TACT_ENV_ID">1164</attribute>
<attribute type="TESTACTIONS-TACT_REL_ID">271</attribute>
<attribute type="TESTACTIONS-TACT_TESTER_USR_ID_2">MIKN</attribute>
<attribute type="TESTACTIONS-TACT_QAT_ID">23</attribute>
<attribute type="TESTACTIONS-TACT_TOBJ_ID">3771</attribute>
<attribute type="PROTOCOLS-PRC_PROTOCOLTYP_ID">N</attribute>
<attribute type="PROTOCOLS-PRC_TACT_ID">27568</attribute>
<attribute type="TESTACTIONS-TACT_COMP_ID">3771</attribute>
<attribute type="TESTACTIONS-TACT_SEV_ID">0</attribute>
<attribute type="PROTOCOLS-PRC_USR_ID">MIKN </attribute>
<attribute type="TESTACTIONS-TACT_REV_ID">99</attribute>
<attribute type="TESTACTIONS-TACT_TESTER_USR_ID">MIKN</attribute>
<attribute type="TESTACTIONS-TACT_TDATE">16.09.2004</attribute>
<attribute type="TESTACTIONS-TACT_DEV_REL_ID">271</attribute>
<attribute type="TESTACTIONS-TACT_TEST_DBV_ID">ORA9R2_EE </attribute>
<attribute type="PROTOCOLS-PRC_USRROLE_ID">QPV </attribute>
<attribute type="PROTOCOLS-PRC_DATE">16.09.2004</attribute>
<attribute type="TESTACTIONS-TACT_TEST_BNR_ID">b1001_csvext </attribute>
</event>
.
.
.
Leider ist in beiden Dateien die Reihenfolge der Events unterschiedlich. Im ersten Schritt gehe ich hin und zähle in beiden Dateien die Anzahl der Events und vergleiche diese miteinander. Das geht schon. Im zweiten Schritt möchte ich nun mit dem Attribut "PROTOCOLS-PRC_ID" über die Dateien laufen. Sobald dies gefunden worden ist, will ich nun alle Attribute die in diesem Eventblock stehen in einem Array speichern. Das mache ich mit beiden Dateien.
Nun zu meinem Problem. Wie ich nach dem Attribut "PROTOCOLS-PRC_ID" suche weiss ich, aber wie bekomme ich nun die Attribute dieses Blockes in das Array ? Es stehen ja welche darüber und welche darunter.
Danke und Gruß
Michael