List of utility methods to do XML Document Create
Document | createDocument() Create empty document TO BE DEBUGGED!. DocumentBuilder documentBuilder = null; try { documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); } catch (ParserConfigurationException pce) { warn("ParserConfigurationException: " + pce); return null; return documentBuilder.newDocument(); ... |
Document | createDocument() Create and return a new instance of a DOM Document object to build a queue tree with. Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
return doc;
|
Document | createDocument() Returns a document newly created by the class's static DocumentBuilder. return documentBuilder.newDocument();
|
Document | createDocument() create Document final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); try { return dbf.newDocumentBuilder().newDocument(); } catch (final ParserConfigurationException e) { throw new RuntimeException(); |
Document | createDocument(boolean createRoot) Create and return an empty XML Document. init(); if (docBuilder != null) { final Document result; synchronized (docBuilder) { result = docBuilder.newDocument(); if (createRoot) createRootElement(result); ... |
Document | createDocument(boolean isSecureProcessing) DOM Level 1 did not have a standard mechanism for creating a new Document object. try { DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); dfactory.setNamespaceAware(true); dfactory.setValidating(true); if (isSecureProcessing) { try { dfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); } catch (ParserConfigurationException pce) { ... |
org.w3c.dom.Document | createDocument(boolean validating, boolean namespaceAware) create Document DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(validating);
factory.setNamespaceAware(namespaceAware);
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.newDocument();
|
Document | createDocument(byte[] data) create Document DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); InputStream input = null; try { DocumentBuilder p = f.newDocumentBuilder(); input = new ByteArrayInputStream(data); return p.parse(input); } catch (ParserConfigurationException e) { throw new RuntimeException(e); ... |
Document | createDocument(File file) create org.w3c.dom.Document from file synchronized (lock) { return builder.parse(file); |
Document | createDocument(File file) create Document return createDocument(new InputSource(new FileReader(file))); |