Code example for SAXSource

0
 
	    try { 
		final long stamp = System.currentTimeMillis();
                _dom = (DOMEnhancedForDTM)_dtmManager.getDTM(
                                 new SAXSource(_reader, new InputSource(uri)),
                                 false, null, true, false); 
		_dom.setDocumentURI(uri);
 
		// The build time can be used for statistics for a better 
		// priority algorithm (currently round robin). 
		final long thisTime = System.currentTimeMillis() - stamp;
		if (_buildTime > 0)
		    _buildTime = (_buildTime + thisTime) >>> 1;
		else 
		    _buildTime = thisTime;
	    } 
	    catch (Exception e) {
		_dom = null;
	    } 
	}