0

Trying to import from an XML feed using Feeds Importer XPath XML. I have had an import working from this same feed before but with uniqueness based on a title field which is no longer apropriate.

I'm trying to alter the import so that I now use a guid. The problem is that the ID I need to use is only located within the top level element where the context starts.

XML looks like:

<vacancies>
  <vacancy id="111427">
    <uri>https://data.ox.ac.uk/id/vacancy/111427</uri>
    <url>https://data.ox.ac.uk/doc/vacancy/111427</url>
    <webpage>https://www.recruit.ox.ac.uk/pls/hrisliverecruit...</webpage>
    <label>Postdoctoral Scientist - Protein Biochemistry</label>
    <opens>2014-01-16T09:08:14+00:00</opens>
    <closes>2014-02-17T12:00:00+00:00</closes>
    ...

My context is /vacancies/vacancy and I am mapping my guid to @id which I think is the correct syntax.

The import doesn't work correctly, I get no nodes and no errors. What am I doing wrong (if anything)? There is nothing I can do about the XML schema incidentally, if that is where the problem is.

  • Have you gone through the issue queue? We have had trouble with this module, and have had to use some of the patches from the queue. – mpdonadio Feb 14 '14 at 17:27
0

I just did a quick test of this, with your sample data, and it works correctly.

In the debug options you can enable error reporting, as well as, show the outputs of various queries.

  • OK, what was the syntax you used for the context and the guid mapping where it worked? – Paul Barrett Feb 20 '14 at 14:24
  • I've abandoned the XML approach and tried with a JSON version of the same feed... which has let to a new issue... – Paul Barrett Feb 21 '14 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.