Hi there,
I am trying to iterate through sub-nodes and have a little problem.
I get the sub-nodes fine, but I can't access the attributes.
XML:
<TransactionList>
<Transaction id="1"/>
<Transaction id="2"/>
</TransactionList>
SOURCE:
Iterator i = request.selectNodes("/TransactionList/Transaction").iterator();
while (i.hasNext()) {
Element e = (Element)i.next();
System.out.println("ID=" + e.selectSingleNode("/Transaction/@transactionidsender").getText());
}
Can someone give me a hint ?
cheers Mike