public XExtension parse(File file) throws IOException, ParserConfigurationException, SAXException {
		BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
		// set up a specialized SAX2 handler to fill the container
		XExtensionHandler handler = new XExtensionHandler();
		// set up SAX parser and parse provided log file into the container
		SAXParserFactory parserFactory = SAXParserFactory.newInstance();
		SAXParser parser = parserFactory.newSAXParser();
		parser.parse(is, handler);
		is.close();
		return handler.getExtension();
	}
public XExtension parse ( File file ) throws IOException , ParserConfigurationException , SAXException { BufferedInputStream is = new BufferedInputStream ( new FileInputStream ( file ) ) ; XExtensionHandler handler = new XExtensionHandler ( ) ; SAXParserFactory parserFactory = SAXParserFactory . newInstance ( ) ; SAXParser parser = parserFactory . newSAXParser ( ) ; parser . parse ( is , handler ) ; is . close ( ) ; return handler . getExtension ( ) ; }
Parses an extension from a definition file.

@param file The definition file containing the extension.
@return The extension object, as defined in the provided file.