abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Moseley" <...@osafoundation.org>
Subject Re: problems setting entry content
Date Sat, 31 Mar 2007 21:42:15 GMT
On 3/31/07, Adam Constabaris <adam@clownsinmycoffee.net> wrote:

> 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.

ah, it wasn't immediately clear that my string was being parsed as
xml. my string actually is an xml document, which i believe is well
formed, so i'm not sure what specifically could be going wrong with
the parsing. i guess i'll need to step through with a debugger to see.

here's something interesting: i'm now trying to set a json string
value with the media type "application/eim+json", and it's also
failing in exactly the same way.

i finally found something that works. instead of calling
setContent(Content, String), i'm calling setContent(String, String).
this has exactly the effect i want. i guess my original problem was in
misusing the abdera Content class.

Mime
View raw message