import org.w3c.dom.*;
public class DOM3ParserMaker {
  public static void main(String[] args) {
    DOMImplementationFactoryLS impl =
      (DOMImplementationLS) DOMImplementationFactory.getDOMImplementation();
    DOMBuilder parser = impl.getDOMBuilder();
    for (int i = 0; i < args.length; i++) {
      try {
        Document d = parser.parseURI(args[i]);
      }
      catch (DOMSystemException e) {
        System.err.println(e);
      }
      catch (DOMException e) {
        System.err.println(e);
      }
    }
  }
}
This code will not actually compile or run until some parser supports DOM3 Load and Save.