List of utility methods to do XML DocumentBuilder Create
DocumentBuilderFactory | getDocumentBuilderFactory(String schema) Gets the document builder factory. System.setProperty(DOCUMENT_BUILDER_FACTORY_KEY, DOCUMENT_BUILDER_FACTORY_VALUE);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
factory.setAttribute(SCHEMA_LANGUAGE_KEY, HTTP_WWW_W3_ORG_2001_XML_SCHEMA);
factory.setAttribute(SCHEMA_SOURCE_KEY, schema);
return factory;
|
String | getDocumentBuilderFactoryClassName() get Document Builder Factory Class Name DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
return factory.getClass().getName();
|
DocumentBuilder | getNewDocumentBuilder() get New Document Builder return DOC_FACTORY.get().newDocumentBuilder();
|
DocumentBuilder | getNewDocumentBuilder() get New Document Builder try { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setAttribute("http://xml.org/sax/features/namespaces", true); factory.setAttribute("http://xml.org/sax/features/validation", false); factory.setAttribute("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false); factory.setAttribute("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); factory.setNamespaceAware(true); factory.setIgnoringElementContentWhitespace(true); ... |
DocumentBuilder | newDocumentBuilder() Construct a non-validating document builder. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(false); try { factory.setFeature("http://xml.org/sax/features/validation", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); return factory.newDocumentBuilder(); ... |
DocumentBuilder | newDocumentBuilder() Return a new DocumentBuilder for parsing into DOM. final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setNamespaceAware(true); documentBuilderFactory.setValidating(false); documentBuilderFactory.setIgnoringComments(true); documentBuilderFactory.setIgnoringElementContentWhitespace(true); try { return documentBuilderFactory.newDocumentBuilder(); } catch (ParserConfigurationException exception) { ... |
DocumentBuilder | newDocumentBuilder() new Document Builder return newDocumentBuilder(true);
|
DocumentBuilder | newDocumentBuilder() new Document Builder try { return DocumentBuilderFactory.newInstance().newDocumentBuilder(); } catch (final Exception e) { throw new IllegalStateException(e.getMessage(), e); |
DocumentBuilder | newDocumentBuilder() new Document Builder return newDocumentBuilderFactory().newDocumentBuilder();
|
DocumentBuilder | newDocumentBuilder() Creates a new DocumentBuilder object. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true);
factory.setNamespaceAware(true);
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setExpandEntityReferences(false);
factory.setCoalescing(false);
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
...
|