KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > org > w3c > dom > DOMImplementation

org.w3c.dom
Interface DOMImplementation

See Also:
Top Examples, Source Code

Document createDocument(String namespaceURI,
                        String qualifiedName,
                        DocumentType doctype)
                        throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


DocumentType createDocumentType(String qualifiedName,
                                String publicId,
                                String systemId)
                                throws DOMException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


Object getFeature(String feature,
                  String version)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


boolean hasFeature(String feature,
                   String version)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1576]Builds a DOM parser and queries it for features/modules, reporting the results
By Anonymous on 2005/11/04 20:23:08  Rate
//it builds a DOM parser and queries it for features/modules, reporting the results. 
 final String [  ]  DOMFeatures = 
  {  
   "Core", // Crimson returns false - apparently an error 
   "XML", 
   "HTML", 
   "Views", 
   "StyleSheets", 
   "CSS", 
   "CSS2", 
   "Events", 
   "UIEvents", 
   "MouseEvents", 
   "MutationEvents", 
   "HTMLEvents", 
   "Traversal", 
   "Range" 
  } ; 
  
  
 try 
  {  
   DOMImplementation impl = DocumentBuilderFactory.newInstance  (  ) . 
     newDocumentBuilder  (  ) .getDOMImplementation  (  ) ; 
   System.out.println  ( "DOM implementation class: " + 
     impl.getClass  (  ) .getName  (  )  ) ; 
   System.out.println  (  ) ; 
  
  
  
   System.out.println  ( "DOM Features:" ) ; 
   for  ( int d = 0; d  <  DOMFeatures.length; ++d )  
    {  
     System.out.println  ( " " + DOMFeatures [ d ]  + ": " + 
       impl.hasFeature  ( DOMFeatures [ d ] , "2.0" )  ) ; 
    }  
  }  
 catch  ( Exception ex )  
  {  
   ex.printStackTrace  (  ) ; 
  }  
 

Popular Tags