/** * Obtains DOMImpementaton interface providing a number of methods for performing * operations that are independent of any particular DOM instance. * * @throw DOMException <code>NOT_SUPPORTED_ERR</code> if cannot get DOMImplementation * @throw FactoryConfigurationError Application developers should never need to directly catch errors of this type. * * @return DOMImplementation implementation */ private static DOMImplementation getDOMImplementation() throws DOMException { //can be made public DocumentBuilderFactory factory = getFactory(false, false); try { return factory.newDocumentBuilder().getDOMImplementation(); } catch (ParserConfigurationException ex) { throw new DOMException( DOMException.NOT_SUPPORTED_ERR, "Cannot create parser satisfying configuration parameters" ); //NOI18N } catch (RuntimeException e) { // E.g. #36578, IllegalArgumentException. Try to recover gracefully. throw (DOMException) new DOMException(DOMException.NOT_SUPPORTED_ERR, e.toString()).initCause(e); } }
private static Document createDocument(String ns, String root) throws DOMException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { return factory.newDocumentBuilder().getDOMImplementation().createDocument(ns, root, null); } catch (ParserConfigurationException ex) { throw (DOMException) new DOMException(DOMException.NOT_SUPPORTED_ERR, "Cannot create parser").initCause(ex); // NOI18N } } }
private static Document createDocument(String ns, String root) throws DOMException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { return factory.newDocumentBuilder().getDOMImplementation().createDocument(ns, root, null); } catch (ParserConfigurationException ex) { throw (DOMException) new DOMException(DOMException.NOT_SUPPORTED_ERR, "Cannot create parser").initCause(ex); // NOI18N } } }
DOMException.INVALID_ACCESS_ERR, "Unable to serailise DOM subtree."); domExcep.initCause(e); throw domExcep;
/** * Obtains DOMImpementaton interface providing a number of methods for performing * operations that are independent of any particular DOM instance. * * @throw DOMException <code>NOT_SUPPORTED_ERR</code> if cannot get DOMImplementation * @throw FactoryConfigurationError Application developers should never need to directly catch errors of this type. * * @return DOMImplementation implementation */ private static DOMImplementation getDOMImplementation() throws DOMException { //can be made public DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { return factory.newDocumentBuilder().getDOMImplementation(); } catch (ParserConfigurationException ex) { throw new DOMException(DOMException.NOT_SUPPORTED_ERR , "Cannot create parser satisfying configuration parameters"); //NOI18N } catch (RuntimeException e) { // E.g. #36578, IllegalArgumentException. Try to recover gracefully. throw (DOMException)new DOMException(DOMException.NOT_SUPPORTED_ERR, e.toString()).initCause(e); } }
DOMException.INVALID_ACCESS_ERR, "Unable to serailise DOM subtree."); domExcep.initCause(e); throw domExcep;
DOMException.INVALID_ACCESS_ERR, "Unable to serailise DOM subtree."); domExcep.initCause(e); throw domExcep;
/** * Obtains DOMImpementaton interface providing a number of methods for performing * operations that are independent of any particular DOM instance. * * @throw DOMException <code>NOT_SUPPORTED_ERR</code> if cannot get DOMImplementation * @throw FactoryConfigurationError Application developers should never need to directly catch errors of this type. * * @return DOMImplementation implementation */ private static DOMImplementation getDOMImplementation() throws DOMException { //can be made public DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { return factory.newDocumentBuilder().getDOMImplementation(); } catch (ParserConfigurationException ex) { throw new DOMException(DOMException.NOT_SUPPORTED_ERR , "Cannot create parser satisfying configuration parameters"); //NOI18N } catch (RuntimeException e) { // E.g. #36578, IllegalArgumentException. Try to recover gracefully. throw (DOMException)new DOMException(DOMException.NOT_SUPPORTED_ERR, e.toString()).initCause(e); } }
public final org.w3c.dom.Node appendChild(org.w3c.dom.Node child) throws DOMException { if (getOwnerDocument() != child.getOwnerDocument()) { throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "Wrong document"); } try { if (child instanceof Element) { return appendElement((Element)child); } else { target.appendChild(((ProxyNode<?,?>)child).target); return child; } } catch (SOAPException e) { DOMException ex = new DOMException(DOMException.HIERARCHY_REQUEST_ERR, e.getMessage()); ex.initCause(e); throw ex; } }
/** * Obtains DOMImpementaton interface providing a number of methods for performing * operations that are independent of any particular DOM instance. * * @throw DOMException <code>NOT_SUPPORTED_ERR</code> if cannot get DOMImplementation * @throw FactoryConfigurationError Application developers should never need to directly catch errors of this type. * * @return DOMImplementation implementation */ private static DOMImplementation getDOMImplementation() throws DOMException { //can be made public DocumentBuilderFactory factory = getFactory(false, false); try { return factory.newDocumentBuilder().getDOMImplementation(); } catch (ParserConfigurationException ex) { throw new DOMException( DOMException.NOT_SUPPORTED_ERR, "Cannot create parser satisfying configuration parameters" ); //NOI18N } catch (RuntimeException e) { // E.g. #36578, IllegalArgumentException. Try to recover gracefully. throw (DOMException) new DOMException(DOMException.NOT_SUPPORTED_ERR, e.toString()).initCause(e); } }
/** * Obtains DOMImpementaton interface providing a number of methods for performing * operations that are independent of any particular DOM instance. * * @throw DOMException <code>NOT_SUPPORTED_ERR</code> if cannot get DOMImplementation * @throw FactoryConfigurationError Application developers should never need to directly catch errors of this type. * * @return DOMImplementation implementation */ private static DOMImplementation getDOMImplementation() throws DOMException { //can be made public DocumentBuilderFactory factory = getFactory(false, false); try { return factory.newDocumentBuilder().getDOMImplementation(); } catch (ParserConfigurationException ex) { throw new DOMException( DOMException.NOT_SUPPORTED_ERR, "Cannot create parser satisfying configuration parameters" ); //NOI18N } catch (RuntimeException e) { // E.g. #36578, IllegalArgumentException. Try to recover gracefully. throw (DOMException) new DOMException(DOMException.NOT_SUPPORTED_ERR, e.toString()).initCause(e); } }
public final org.w3c.dom.Node appendChild(org.w3c.dom.Node child) throws DOMException { if (getOwnerDocument() != child.getOwnerDocument()) { throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "Wrong document"); } try { if (child instanceof Element) { return appendElement((Element)child); } else { target.appendChild(((ProxyNode<?,?>)child).target); return child; } } catch (SOAPException e) { DOMException ex = new DOMException(DOMException.HIERARCHY_REQUEST_ERR, e.getMessage()); ex.initCause(e); throw ex; } }
"STRING_TOO_LONG", new Object[] { ioe.getMessage()}); throw (DOMException) new DOMException(DOMException.DOMSTRING_SIZE_ERR, msg).initCause(ioe);
"STRING_TOO_LONG", new Object[] { ioe.getMessage()}); throw (DOMException) new DOMException(DOMException.DOMSTRING_SIZE_ERR, msg).initCause(ioe);