Feeds in AgriDrupal

I was asked for help by Richard Mugata on how he could use the Feeds module to create nodes from Agris data and since I know that others have looked a bit at the Feeds module and had some issues I thought I'd write something here.

First of all, AgriDrupal is currently using the FeedApi, Feed Element Mapper and a feedapi_eparser module to parse xml feeds with namespace.  However,  as of last year, the developers of the FeedApi module announce that there will be no new development and and new development (and migration to D7) will be on the Feeds module. 

One of the issues with the Feeds module, and parseing xml was the lack of namespace support.  There has been a considerable amount of work done lately that addresses the namespace issue.  There are two modules, both of which are basically Feeds module parser implementation, that I have been looking at.  The first is feeds_xmlparser.  There is a drupal project for it at http://www.drupal.org/project/feeds_xmlparser that is mostly a placeholder for creating issue and the code itself is in a Git repository.  The second module is feeds_xpathparser with a project page at http://www.drupal.org/project/feeds_xpathparser.  Both modules actually use XPath to parse an XML file and use the php SimpleXML library for reading and parseing an xml feed.  I've had marginal luck with them but they seem to be a step in the right direction for providing a flexible xml parser for Feeds.

The first thing that I noticed that the Agris xml file that I was working with defined a namespace that the SimpleXML getNamespaces() function wasn't discovering.  The namespace definition in the file is as follows:

xmlns:agls="http://www.naa.gov.au/recordkeeping/gov_online/agls/1.2"

When using that uri the getNamespace function silently ignored the prefix and namespace.  When I changed the uri to http://www.naa.gov.au/agls/   it found the namespace.

The other issue that I've run into is that it seems to be having trouble determining a unique GUID for each resource from the attribute.

<ags:resource ags:ARN="KE2009400905">

Has there been any though to creating an "ags:uid" element for holding the unique idea rather than getting it from the attribute?  I don't know if this is just an issue with the PHP SimpleXML library but that's what I have to work with in a Drupal instance.

I also have noticed that the Agris site has been down most of the day so I haven't been able to grab some agris xml directly from the site so some of these issues may only exist in the code I got from Richard.