abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woody Anderson" <wo...@xoopit.com>
Subject extensionfactory to handle bad namespace
Date Wed, 31 Oct 2007 19:47:12 GMT

i'm getting an errant namespace in responses from various servers.

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://purl.org/atom/ns#">
  <title xmlns="http://purl.org/atom/ns#">Example Title</title>
  <summary xmlns="http://purl.org/atom/ns#">Example Text</summary>
  <content xmlns="http://purl.org/atom/ns#" mode="xml">
    <div xmlns="http://www.w3.org/1999/xhtml">Example Text</div>
  <id xmlns="http://purl.org/atom/ns#">urn:lj:livejournal.com:atom1:username:number</id>
  <link xmlns="http://purl.org/atom/ns#" type="application/x.atom+xml"
href="http://www.livejournal.com/interface/atom/edit/3" title="Example
  <link xmlns="http://purl.org/atom/ns#" type="text/html"
rel="alternate" href="http://username.livejournal.com/number.html"
title="Example Title"/>

i want to handle this as though it were a correctly namespaced entry.
all types of elements from this server comeback with this namespace,
so i need this for each of the model elements.

I'm a bit confused about how i do this for all elements. I've been
looking at AbstractExtensionFactory.
and ExtensionFactory docs, but it is unclear what getElementWrapper()
is supposed to do to make it all "work".

i would hope that it's fairly simple to consume this bogus namespace.

i found an old example doing something *similar* that extended
FOMExtensionFactory (which no longer exists..) to handle an Atom03
feed. This example doesn't work anymore and was still pretty confusing
as it seemed to work for Feed only.

is there a simple way to handle this errant ns?

View raw message