abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r422847 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Date Mon, 17 Jul 2006 20:33:50 GMT
Author: jmsnell
Date: Mon Jul 17 13:33:50 2006
New Revision: 422847

URL: http://svn.apache.org/viewvc?rev=422847&view=rev
Log:
Axiom provides some caching of XMLInputFactory objects we want to take advantage of

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java?rev=422847&r1=422846&r2=422847&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMParser.java
Mon Jul 17 13:33:50 2006
@@ -21,7 +21,6 @@
 import java.io.Reader;
 import java.net.URI;
 
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.abdera.factory.Factory;
@@ -33,6 +32,7 @@
 import org.apache.abdera.parser.stax.util.FOMSniffingInputStream;
 import org.apache.abdera.util.AbstractParser;
 import org.apache.axiom.om.OMDocument;
+import org.apache.axiom.om.util.StAXUtils;
 
 public class FOMParser 
   extends AbstractParser 
@@ -84,8 +84,7 @@
         charset = sin.getEncoding();
         in = sin;
       }
-      XMLStreamReader xmlreader = 
-        XMLInputFactory.newInstance().createXMLStreamReader(in);
+      XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(in);
       if (options != null && charset != null) options.setCharset(charset);
       FOMFactory factory = getFomFactory(options);
       FOMBuilder builder = new FOMBuilder(factory, xmlreader, options);
@@ -109,8 +108,7 @@
       throw new IllegalArgumentException("Reader must not be null");
     try {
       FOMFactory factory = getFomFactory(options);
-      XMLStreamReader xmlreader = 
-        XMLInputFactory.newInstance().createXMLStreamReader(in);
+      XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(in);
       FOMBuilder builder = new FOMBuilder(factory, xmlreader, options);
       document = getDocument(builder, base);
       setCharset(options, xmlreader.getCharacterEncodingScheme(), document);



Mime
View raw message