Which modules are supported?

import org.apache.xerces.dom.DOMImplementationImpl;
import org.w3c.dom.*;
import java.io.*;


public class ModuleChecker {

  public static void main(String[] args) {
     
    // parser dependent
    DOMImplementation implementation 
     = DOMImplementationImpl.getDOMImplementation();
    String[] features = {"XML", "HTML", "Views", "StyleSheets",
     "CSS", "CSS2", "Events", "UIEvents", "MouseEvents", 
     "MutationEvents", "HTMLEvents", "Traversal", "Range"};
    
    for (int i = 0; i < features.length; i++) {
      if (implementation.hasFeature(features[i], "2.0")) {
        System.out.println("Implementation supports " 
         + features[i]);
      } 
      else {
        System.out.println("Implementation does not support " 
         + features[i]);
      } 
    }
  
  }

}

Previous | Next | Top | Cafe con Leche

Copyright 2000-2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified March 8, 2000