abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1437727 - /abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
Date Wed, 23 Jan 2013 20:57:06 GMT
Author: veithen
Date: Wed Jan 23 20:57:06 2013
New Revision: 1437727

URL: http://svn.apache.org/viewvc?rev=1437727&view=rev
Log:
Avoid using internal Axiom APIs.

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

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java?rev=1437727&r1=1437726&r2=1437727&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
(original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
Wed Jan 23 20:57:06 2013
@@ -50,9 +50,7 @@ import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMProcessingInstruction;
 import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
 import org.apache.axiom.om.impl.llom.OMDocumentImpl;
-import org.apache.axiom.om.util.StAXUtils;
 
 @SuppressWarnings("unchecked")
 public class FOMDocument<T extends Element> extends OMDocumentImpl implements Document<T>
{
@@ -148,10 +146,7 @@ public class FOMDocument<T extends Eleme
                 OMOutputFormat outputFormat = new OMOutputFormat();
                 if (this.getCharsetEncoding() != null)
                     outputFormat.setCharSetEncoding(this.getCharsetEncoding());
-                MTOMXMLStreamWriter omwriter = new MTOMXMLStreamWriter(StAXUtils.createXMLStreamWriter(writer));
-                omwriter.setOutputFormat(outputFormat);
-                this.internalSerialize(omwriter);
-                omwriter.flush();
+                this.serialize(writer, outputFormat);
             } catch (XMLStreamException e) {
                 throw new FOMException(e);
             }



Mime
View raw message