abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Constabaris <a...@clownsinmycoffee.net>
Subject Re: problems setting entry content
Date Sat, 31 Mar 2007 14:08:28 GMT
Brian Moseley wrote:
>
> setting content as Content with type
> ==========================
>
> Content content = factory.newContent();
> content.setValue("foo");
> content.setMimeType("application/eim+xml");
> entry.setContent(content, "application/eim+xml");
>
> after doing this, entry.getContent() returns null, and when i ouput
> the entry document, the content element is empty (but once again has
> the correct type).
>
> any ideas?

If you are going to use an XML content type, then the content has to be 
a well-formed fragment; so change that to 
entry.setContent("<foo>foo</foo>", "application/eim+xml") and you should 
see results.  What's happening is that your content is passed through an 
XML parser when you call setContent, and the code in 0.2.2 and trunk 
silently swallows (most? all?) parsing exceptions.

AC

Mime
View raw message