Code example for Locator

Methods: getColumnNumber, getLineNumber, getSystemId

0
	 
    public void nextActionHandler(NVDLAction action, Locator l) {
        if (!quiet) {
            NVDLMessage mes = action.getMessage();
            String localeCode = Locale.getDefault().getLanguage();
            Location location = new Location(l.getLineNumber(),
                                             l.getColumnNumber(),
                                             l.getSystemId());
            String m = mes.getMessage(localeCode);
            if (m != null) {
                String r = MessageFormatter.locAndModel(location, action, m);
                Log.info(r);
            } 
        } 
    } 
 
    private void setupReader() throws Exception { 
        parser = NVDLSAXReader.newSAXParser();
        parser.getXMLReader().setErrorHandler(eh);
        nvdlReader = new NVDLSAXReader(parser, eh);
    }