Subject: | Can't seem to set content with type of */xml |
Hi,
I've been trying to create a XML::Atom::Content with a mimetype of xml
but no matter what I do the module wraps my content in a <div> tag with
a xhtml namespace. It also adds some other namespaces.
Here is an example:
use XML::Simple;
my $content = XML::Atom::Content;
$content->type('application/xml')
$content->body( XMLOut( [hash to xml encode] );
Then I add the $content to an XML::Atom::Entry and render it to a
string. What I get is something like:
<content
xmlns="http://www.w3.org/2005/Atom"
xmlns:default="http://www.w3.org/1999/xhtml"
type="application/xml">
<div xmlns="http://www.w3.org/1999/xhtml">
<member xmlns="http://mysite.com/ns#member" >
<name>blah blah</name>
<title>nobody</title>
</member>
</div>
</content>
But I should be able to get:
<content type="application/xml">
<member xmlns="http://mysite.com/ns#member" >
<name>blah blah</name>
<title>nobody</title>
</member>
</content>
From looking at the code it seems like this module only support text and
xhtml for the value of content tags, however the Atom specification
should allow otherwise.
I'd like to help try to solve this problem and have some developer time
I can assign for your assistance. Please let me know if you are
interested. Right now I don't think I understand this well enough to
offer a useful patch. Thanks!
--john (jjn1056@yahoo.com)