// Obtain an instance of an XMLReader implementation from a system property
XMLReader parser = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
// Do normal parsing tasks
parser.setContentHandler(new MyContentHandler());
parser.parse(new InputSource("file:///usr/local/projects/xml/test.xml");