Parsing XML attributes in java

alfalavals

New Member
I have an xml similar to this\[code\]<Applications> <ApplicationID> <VendorId value="http://stackoverflow.com/questions/11240521/0" /> <AuthApplId value="http://stackoverflow.com/questions/11240521/4" /> <AcctApplId value="http://stackoverflow.com/questions/11240521/0" /> </ApplicationID> <ApplicationID> <VendorId value="http://stackoverflow.com/questions/11240521/193" /> <AuthApplId value="http://stackoverflow.com/questions/11240521/0" /> <AcctApplId value="http://stackoverflow.com/questions/11240521/19302" /> </ApplicationID></Applications>\[/code\]I want to parse this and store to Strings Like VendorId, AuthApplId etc. I got ApplicationID parsed with \[code\]getElementsByTagName("ApplicationID")\[/code\] if it was \[code\]<ApplicationID value="http://stackoverflow.com/questions/11240521/somevalue"/>\[/code\] then I can use \[code\]getAttribute("value")\[/code\] method. but in the above mentioned situation what should I do?
 
Back
Top