How to write a java program that will parse through an XML file and generate a report?

I'm pretty new to Java and I am trying to write a program that will pick up a file from a windows directory adn parse through the XML file to produce a report that will show a total item count and a total paid amount. Any one have any suggestions? Trying to figure out where to start...

Let me confirm first, you said you are trying to generate report, is it html ? and javascript or java ? please show us your input and expected result, along with your trial and errors.

I'm trying to write a java program that will read and parse through an xml file using java. I need it to get me a each group of batch numbers(so say there are 3 batches, I need it broken down so each batch has it's total of items pertaining to that group with a total amount of payment for that group) once all the groups have been printed with the amount of items and payments it needs to get the total number of items along with a grand total of payments. This will all be written in java.

There are literally hundreds of good examples on the Internet on how to do this. Suggest you search for "java XML group by"

Give us the input XML and expected output