I have an XMl file that looks like:\[code\]<?xml version="1.0" encoding="UTF-8"?><game > <moves> <turn>2</turn> <piece nr="1" /> <turn>4</turn> <piece nr="1" /> </moves></game>\[/code\]I am writing a Java program that takes the XML file as input then parses it with SAX and SAX filter and computes:
- the sum of the content of turn element (here=6)
- the number of piece elements (here=2)