I am a Java beginner. I am trying to write a DOM parser that reads a folder with xml files. For each file, I would like to add an attribute which gets incremented, and I want to save the output file with the same name as the input file.
Here is my code. I am having difficulties in reading each file and putting the results out to the same filename as the input file name. Right now, my code only reads the first file and prints the result to the console.
Can the experts please help me achieve my goal here?
Oh, and by the way people will be more likely to read your post if the code is readable. Which, right now, it isn't. You can make it readable by posting it inside the "code" tags (see the buttons above the box you post in).