Java 8 DOMImplementationRegistry - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DOMImplementationRegistry class.

This code example shows how to use the following methods:getDOMImplementation
		dbf.setNamespaceAware(true);
		try { 
			docBuilder = dbf.newDocumentBuilder();
			 
			domRegistry = DOMImplementationRegistry.newInstance();
			domImpl = (DOMImplementationLS) domRegistry.getDOMImplementation("LS");
			serializer = domImpl.createLSSerializer();
			domConfig = serializer.getDomConfig();
			 
			domConfig.setParameter("comments", new Boolean(true));			
		} catch (Exception e) {			
			LOG.error("Initialization failed", e);
		} 
	} 
	 
	public static Document parseDocument(InputStream is) throws DigsigException {
		 
		Document doc = null;
		 
		try { 
4
CodeRank
This code example shows how to use the following methods:getDOMImplementation
		dbf.setNamespaceAware(true);
		try { 
			docBuilder = dbf.newDocumentBuilder();
			 
			domRegistry = DOMImplementationRegistry.newInstance();
			domImpl = (DOMImplementationLS) domRegistry.getDOMImplementation("LS");
			serializer = domImpl.createLSSerializer();
			domConfig = serializer.getDomConfig();
			 
			domConfig.setParameter("comments", new Boolean(true));			
		} catch (Exception e) {			
			LOG.error("Initialization failed", e);
		} 
	} 
	 
	public static Document parseDocument(InputStream is) throws DigsigException {
		 
		Document doc = null;
		 
		try { 
4
CodeRank
This code example shows how to use the following methods:getDOMImplementation
			if (registry == null) {
				registry = DOMImplementationRegistry.newInstance();
			} 
 
			if (impl == null) {
				impl = registry.getDOMImplementation("Core 3.0 XML 3.0 LS");
				if (impl == null) {
					throw new OrccRuntimeException( 
							"no DOM 3 implementation found"); 
				} 
			} 
		} catch (ClassNotFoundException e) {
			throw new OrccRuntimeException("DOM error", e);
		} catch (InstantiationException e) {
			throw new OrccRuntimeException("DOM error", e);
		} catch (IllegalAccessException e) {
			throw new OrccRuntimeException("DOM error", e);
		} 
	} 
 
3
CodeRank
See Code Examples for Java 8 DOMImplementationRegistry Methods: