abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r596858 - in /incubator/abdera/java/trunk: examples/src/main/java/org/apache/abdera/examples/simple/StreamWriterExample.java parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Date Tue, 20 Nov 2007 22:39:07 GMT
Author: jmsnell
Date: Tue Nov 20 14:39:06 2007
New Revision: 596858

URL: http://svn.apache.org/viewvc?rev=596858&view=rev
Log:
Fix startElement(...) so that the output is correct when no namespace and prefix is provided

Modified:
    incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/StreamWriterExample.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java

Modified: incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/StreamWriterExample.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/StreamWriterExample.java?rev=596858&r1=596857&r2=596858&view=diff
==============================================================================
--- incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/StreamWriterExample.java
(original)
+++ incubator/abdera/java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/StreamWriterExample.java
Tue Nov 20 14:39:06 2007
@@ -69,7 +69,12 @@
             .startElement(new QName("x","y","z"))
               .writeElementText("This is a test")
               .startElement("a")
-              .writeElementText("foo")
+                .writeElementText("foo")
+              .endElement()
+              .startElement("b","bar")
+                .writeAttribute("foo", new Date())
+                .writeAttribute("bar", 123L)
+                .writeElementText(123.123)
               .endElement()
             .endElement()
           .endElement()

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java?rev=596858&r1=596857&r2=596858&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/StaxStreamWriter.java
Tue Nov 20 14:39:06 2007
@@ -162,11 +162,12 @@
           namespace);
       } else if (namespace != null) {
         writer.writeStartElement(
+          "",
           name, 
           namespace);
       } else {
-        writer.writeStartElement(
-          name);
+        writer.writeStartElement("",name,"");
+        writer.writeDefaultNamespace("");
       }
       writeNamespace(prefix,namespace,false);
       if (autoflush) writer.flush();



Mime
View raw message