At https://www.onli-blogging.de/feeds/index.rss2, I have an RSS feed with an empty description:
<description></description>
OXML produces this hash element from that:
channel: {
...
description: nil
Sound so far, but when then building XML from that has, the XML builder is adding xsi:nil
<description xsi:nil="true">
(And also seems to switch to a non-closed element, which would be a separate problem). The resulting XML now can not be parsed by the RSS gem, I get this error:
RSS::NotWellFormedError: This is not well formed XML
Undefined prefix xsi found
I think the RSS gem is correct here, the xsi namespace is indeed not defined and the attribute should not have been added like this.
|
builder.element(Utils.camelize(key), 'xsi:nil': 'true') |
is the responsible line, already part of
cf663ff, but I'm missing the context here why this was added.
I would propose that OXML should not add the xsi attribute at all.
At https://www.onli-blogging.de/feeds/index.rss2, I have an RSS feed with an empty description:
OXML produces this hash element from that:
Sound so far, but when then building XML from that has, the XML builder is adding
xsi:nil(And also seems to switch to a non-closed element, which would be a separate problem). The resulting XML now can not be parsed by the RSS gem, I get this error:
I think the RSS gem is correct here, the xsi namespace is indeed not defined and the attribute should not have been added like this.
oxml/lib/oxml/builder.rb
Line 37 in 5fa61c1
I would propose that OXML should not add the xsi attribute at all.