I am new to Java and XML. I am trying to figure out how to read in this XML file and use the elements to determine certain conditions. I will paste my XML file below. In my application, I am going to ask the user to enter a username, password and filename. I want to say in my Java code:
if filename = (file name user entered) and user is (username user entered)
print “Access allowed
print “Access denied”
As you can see, the XML file will contain the roles and the usernames associated with those roles. I know how to write the Java code for everything else except reading in the XML file. Can someone give me some help on how to get that going?