abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckopp...@apache.org
Subject svn commit: r1052368 - /abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
Date Thu, 23 Dec 2010 19:53:40 GMT
Author: ckoppelt
Date: Thu Dec 23 19:53:39 2010
New Revision: 1052368

URL: http://svn.apache.org/viewvc?rev=1052368&view=rev
Log:
applied patch for ABDERA-251

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

Modified: abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java?rev=1052368&r1=1052367&r2=1052368&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java (original)
+++ abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java Thu Dec
23 19:53:39 2010
@@ -17,7 +17,7 @@
  */
 package org.apache.abdera.parser.stax;
 
-import java.io.ByteArrayOutputStream;
+import java.io.StringWriter;
 import java.util.Iterator;
 
 import javax.xml.namespace.QName;
@@ -129,15 +129,15 @@ public class FOMDiv extends FOMExtensibl
 
     protected String getInternalValue() {
         try {
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            StringWriter out = new StringWriter();
             XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
-            writer.writeStartElement("");
+            writer.writeStartElement(""); 
             for (Iterator<?> nodes = this.getChildren(); nodes.hasNext();) {
                 OMNode node = (OMNode)nodes.next();
                 node.serialize(writer);
             }
-            writer.writeEndElement();
-            return out.toString().substring(2);
+            writer.writeEndElement(); 
+            return out.getBuffer().toString().substring(2);
         } catch (Exception e) {
         }
         return "";



Mime
View raw message