So I would like to get a NodeList from a specific node. I'm writing a program which replicates a bank as a form of "final" in this course and I've written an XML document which contains all clients for my bank. I've written code for a log-in function and now I want to return the specific clients details.
<clients> <client> <name>Victor Olin</name> <ssid>20000724</ssid> <pswd>storabanken</pswd> <savingsAcc> <name>Victors Sparkonto</name> <accountNumber>111-222-333</accountNumber> <balance>5000</balance> </savingsAcc> <regularAcc> <name>Victors Lönekonto</name> <accountNumber>222-333-444</accountNumber> <balance>314.15</balance> </regularAcc> </client> </clients>
So the wanted result is that I would like a NodeList containing all "savingsAcc" and "regularAcc" this specific client have so I can access all the inner texts and send them to the client. When the client logs in with correct credentials, the correct client is specified and I think that node can act as a root element but I'm not sure on how to implement it.