Java STAX Parser Query XML Document - Java XML

what is the method of Querying XML document using Java SAX Parser?

Demo Example

Here is the input text file we need to Query for rollno: 393

package com.wisdomjobs.xml;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
public class UserHandler extends DefaultHandler {
boolean bFirstName = false;
boolean bLastName = false;
boolean bNickName = false;
boolean bMarks = false;
String rollNo = null;

This would produce the following result:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Java XML Topics