You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by cz...@apache.org on 2002/02/13 14:24:16 UTC
cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml JaxpParser.java Parser.java XercesParser.java
cziegeler 02/02/13 05:24:16
Modified: src/scratchpad/org/apache/avalon/excalibur/xml
JaxpParser.java Parser.java XercesParser.java
Log:
Added createDocument()
Revision Changes Path
1.10 +11 -1 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml/JaxpParser.java
Index: JaxpParser.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml/JaxpParser.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- JaxpParser.java 3 Jan 2002 07:18:28 -0000 1.9
+++ JaxpParser.java 13 Feb 2002 13:24:16 -0000 1.10
@@ -51,7 +51,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Revision: 1.9 $ $Date: 2002/01/03 07:18:28 $
+ * @version CVS $Revision: 1.10 $ $Date: 2002/02/13 13:24:16 $
*/
public class JaxpParser
extends AbstractLogEnabled
@@ -249,6 +249,16 @@
}
}
}
+
+ /**
+ * Return a new <code>Document</code>.
+ */
+ public Document createDocument()
+ throws SAXException {
+ this.setupDocumentBuilder();
+ return this.docBuilder.newDocument();
+ }
+
/**
* Receive notification of a recoverable error.
1.6 +7 -2 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml/Parser.java
Index: Parser.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml/Parser.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Parser.java 11 Dec 2001 09:53:38 -0000 1.5
+++ Parser.java 13 Feb 2002 13:24:16 -0000 1.6
@@ -13,7 +13,6 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;
-
import java.io.IOException;
/**
@@ -24,7 +23,7 @@
* the parsed document.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.5 $ $Date: 2001/12/11 09:53:38 $
+ * @version CVS $Revision: 1.6 $ $Date: 2002/02/13 13:24:16 $
*/
public interface Parser extends Component {
@@ -46,4 +45,10 @@
*/
Document parseDocument(InputSource in)
throws SAXException, IOException;
+
+ /**
+ * Return a new <code>Document</code>.
+ */
+ Document createDocument() throws SAXException;
+
}
1.6 +13 -1 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml/XercesParser.java
Index: XercesParser.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/xml/XercesParser.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XercesParser.java 11 Dec 2001 09:53:38 -0000 1.5
+++ XercesParser.java 13 Feb 2002 13:24:16 -0000 1.6
@@ -9,6 +9,7 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.thread.SingleThreaded;
+import org.apache.xerces.dom.DocumentImpl;
import org.apache.xerces.parsers.DOMParser;
import org.apache.xerces.parsers.SAXParser;
import org.w3c.dom.Document;
@@ -19,12 +20,14 @@
import org.xml.sax.SAXParseException;
import org.xml.sax.ext.LexicalHandler;
import java.io.IOException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
/**
*
* @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.5 $ $Date: 2001/12/11 09:53:38 $
+ * @version CVS $Revision: 1.6 $ $Date: 2002/02/13 13:24:16 $
*/
public class XercesParser
extends AbstractLogEnabled
@@ -77,6 +80,15 @@
return parser.getDocument();
}
+
+ /**
+ * Return a new <code>Document</code>.
+ */
+ public Document createDocument() throws SAXException
+ {
+ return new DocumentImpl();
+ }
+
/**
* Receive notification of a recoverable error.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>