You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ed...@apache.org on 2001/03/13 01:48:07 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java

edwingo     01/03/12 16:48:07

  Modified:    java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
  Log:
  Fix DocumentBuilder.newDocument(), needed for backard compatibility.
  
  Revision  Changes    Path
  1.8       +5 -8      xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
  
  Index: DocumentBuilderImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DocumentBuilderImpl.java	2001/02/13 02:14:18	1.7
  +++ DocumentBuilderImpl.java	2001/03/13 00:48:06	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: DocumentBuilderImpl.java,v 1.7 2001/02/13 02:14:18 edwingo Exp $
  + * $Id: DocumentBuilderImpl.java,v 1.8 2001/03/13 00:48:06 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -82,7 +82,7 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public class DocumentBuilderImpl extends DocumentBuilder {
       /** Xerces features */
  @@ -145,14 +145,11 @@
   
       /**
        * Non-preferred: use the getDOMImplementation() method instead of this
  -     * one
  +     * one to get a DOM Level 2 DOMImplementation object and then use DOM
  +     * Level 2 methods to create a DOM Document object.
        */
       public Document newDocument() {
  -        DOMImplementation di = getDOMImplementation();
  -        // XXX What should the root element be named???
  -        String qName = "root";
  -        DocumentType docType = di.createDocumentType(qName, null, null);
  -        return di.createDocument(null, qName, docType);
  +        return new org.apache.xerces.dom.DocumentImpl();
       }
   
       public DOMImplementation getDOMImplementation() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org