abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r416528 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Date Fri, 23 Jun 2006 00:29:37 GMT
Author: jmsnell
Date: Thu Jun 22 17:29:37 2006
New Revision: 416528

URL: http://svn.apache.org/viewvc?rev=416528&view=rev
Log:
Use the default application/xml mimetype when 
calling setContent("...", Content.Type.XML);

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

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?rev=416528&r1=416527&r2=416528&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
Thu Jun 22 17:29:37 2006
@@ -289,7 +289,12 @@
     Type type, 
     Element parent) {
       if (type == null) type = Content.Type.TEXT;
-      return _newInstance(FOMContent.class, type, (OMContainer)parent);
+      Content content = 
+        _newInstance(
+          FOMContent.class, type, (OMContainer)parent);
+      if (type.equals(Content.Type.XML))
+        content.setMimeType("application/xml");
+      return content;
   }
   
   public Content newContent(MimeType mediaType) {



Mime
View raw message