xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Wolfgang Hoschek <whoschek AT lbl.gov>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] DOMConverter getDOMImplementation
- Date: Mon, 5 Apr 2004 17:28:26 -0700
I'm working a lot with converting from/to DOM and XOM, for example via
DOMConverter.convert(org.w3c.dom.Document, org.w3c.dom.DOMImplementation impl).
Dealing with JAXP and all its factory layers may be flexible but is also quite cumbersome to get a default DOMImplementation.
XOM users probably would like to avoid digging into JAXP as much as possible.
So here is a proposal to add a method getDOMImplementation() or perhaps better named getDefaultDOMImplementation() to DOMConverter:
private static org.w3c.dom.DOMImplementation domImpl = null;
public static synchronized org.w3c.dom.DOMImplementation getDOMImplementation() {
if (domImpl == null) {
javax.xml.parsers.DocumentBuilderFactory factory =
javax.xml.parsers.DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
try {
domImpl =
factory.newDocumentBuilder().getDOMImplementation();
} catch
(javax.xml.parsers.ParserConfigurationException e) {
// do nothing special; just return null
domImpl
}
}
return domImpl;
}
-
[XOM-interest] DOMConverter getDOMImplementation,
Wolfgang Hoschek, 04/05/2004
-
Message not available
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Wolfgang Hoschek, 04/05/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Elliotte Rusty Harold, 04/05/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Wolfgang Hoschek, 04/05/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Elliotte Rusty Harold, 04/06/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Mike Fitzgerald, 04/06/2004
- Re: [XOM-interest] DOMConverter getDOMImplementation, Elliotte Rusty Harold, 04/06/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Mike Fitzgerald, 04/06/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Elliotte Rusty Harold, 04/06/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Wolfgang Hoschek, 04/05/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Elliotte Rusty Harold, 04/05/2004
-
Re: [XOM-interest] DOMConverter getDOMImplementation,
Wolfgang Hoschek, 04/05/2004
-
Message not available
Archive powered by MHonArc 2.6.24.