Package org.w3c.dom

Examples of org.w3c.dom.DOMImplementation


     * @return An implementation that has the desired features, or
     *   <code>null</code> if this source has none.
     */
    public DOMImplementation getDOMImplementation(String features) {
        // first check whether the CoreDOMImplementation would do
        DOMImplementation impl =
            CoreDOMImplementationImpl.getDOMImplementation();
        if (testImpl(impl, features)) {
            return impl;
        }
        // if not try the DOMImplementation
View Full Code Here


        return null;
    }
   
  public DOMImplementationList getDOMImplementations(String features) {
    // first check whether the CoreDOMImplementation would do
    DOMImplementation impl = CoreDOMImplementationImpl.getDOMImplementation();
        DOMImplementationListImpl list = new DOMImplementationListImpl();
    if (testImpl(impl, features)) {
            list.add(impl);     
    }
    impl = DOMImplementationImpl.getDOMImplementation();
View Full Code Here

            serializeElement( (Element) node );
            break;
        }
        case Node.DOCUMENT_NODE : {
            DocumentType      docType;
            DOMImplementation domImpl;
            NamedNodeMap      map;
            Entity            entity;
            Notation          notation;
            int               i;
           
View Full Code Here

        while(names.hasMoreElements()) {
            name = (String)names.nextElement();
            DOMImplementationSource source =
                (DOMImplementationSource) sources.get(name);

            DOMImplementation impl = source.getDOMImplementation(features);
            if (impl != null) {
                return impl;
            }
        }
        return null;
View Full Code Here

        while(names.hasMoreElements()) {
            name = (String)names.nextElement();
            DOMImplementationSource source =
                (DOMImplementationSource) sources.get(name);

            DOMImplementation impl = source.getDOMImplementation(features);
            if (impl != null) {
                list.add(impl);
            }
        }
        return list;
View Full Code Here

        while(names.hasMoreElements()) {
            name = (String)names.nextElement();
            DOMImplementationSource source =
                (DOMImplementationSource) sources.get(name);

            DOMImplementation impl = source.getDOMImplementation(features);
            if (impl != null) {
                list.add(impl);
            }
        }
        return list;
View Full Code Here

        //  newnode.ownerDocument=this;
        // }
        // else

        // get source implementation
        DOMImplementation  domImplementation     =
                  source.getOwnerDocument().getImplementation();
        // DOM Level 2.0 implementation?
        boolean   domLevel20                     =
                  domImplementation.hasFeature("XML", "2.0" );


        int type                                 = source.getNodeType();

        switch (type) {
View Full Code Here

  public Node getRootNode() {
    return doc.getDocumentElement();
  }

  public String serializeToString() {
    DOMImplementation impl = doc.getImplementation();
    DOMImplementationLS implLS = (DOMImplementationLS) impl.getFeature("LS", "3.0");
    LSSerializer lsSerializer = implLS.createLSSerializer();
    lsSerializer.getDomConfig().setParameter("format-pretty-print", true);
    
    LSOutput lsOutput = implLS.createLSOutput();
    lsOutput.setEncoding("UTF-8");
View Full Code Here

                dbf.setNamespaceAware( true );
                dbf.setValidating( false );
            }
            db = dbf.newDocumentBuilder();

            DOMImplementation dim = db.getDOMImplementation();
            d = dim.createDocument("http://java.sun.com/jstl", "dummyroot", null);
            //d = db.newDocument();
            return d;
        } catch ( Exception e ) {
            e.printStackTrace();
        }
View Full Code Here

    private static Document getDummyDocument( ) {
        // we don't need synchronization here; even if two threads
        // enter this code at the same time, we just waste a little time
        if(d==null) {
            DOMImplementation dim = getParser().getDOMImplementation();
            d = dim.createDocument("http://java.sun.com/jaxp/xpath",
                "dummyroot", null);
        }
        return d;
    }
View Full Code Here

TOP

Related Classes of org.w3c.dom.DOMImplementation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.