Ich habe eine XML-Datei im folgenden Format:
<Accounts>
<Account ID="1" City="Bangalore" Amount="2827561.95" />
<Account ID="225" City="New York" Amount="12312.00" />
<Account ID="236" City="London" Amount="457656.00" />
<Account ID="225" City="London" Amount="23462.40" />
<Account ID="236" City="Bangalore" Amount="2345345.00" />
</Accounts>
Was ein Konto einzigartig macht, ist die Kombination von Attributen ID
y City
.
Wie lese ich die Amount
einmalig? Wie lese ich den Betrag für eine Kombination von ID
y City
Attribute?
Ich muss zum Beispiel die Amount
für das Konto mit ID=225
y City=London
. Wenn ich Code verwende wie
Node.GetAttribute('ID')=225
Ich erhalte immer den ersten Knoten mit ID=225
Ich danke Ihnen.