Using xml or xpath parser to combine values?

Created on 28 February 2020, over 4 years ago
Updated 18 April 2024, about 2 months ago

I have a dataset content type and an xml structure like this:

<dataset>
   <purpose>blah blah</purpose>
   <abstract>blah blah</abstract>
   <authors>blah blah1, blah blah2</authors>
   <ordered-authors>
      <author>blah blah</author>
      <author>blah blah</author>
      <author>blah blah</author>
   </ordered-authors>
   <tags>
      <themes>
         <theme name="xxx" rank="1"/>
         <theme name="yyy" rank="1"/>
      </themes>
   </tags>
</dataset>

I want to get the multiple attributes of each theme tag into a form like: xxx-1, yyy-2, etc. which will be used as entity references for each dataset, whether as an array, or a list that I then implode via a tamper. In Drupal 7 there were "dummy" fields to hold temporary values - I could create extra fields in the content type for this purpose but so far, that hasn't helped me find any way to query the xml and/or use available tamper options to combine the nested attributes to get a usable array of concatenated values (short of giving up with the feeds interface and moving to migrate). ANY help or suggestions would be appreciated!

πŸ’¬ Support request
Status

Closed: outdated

Component

XML parser

Created by

πŸ‡ΊπŸ‡ΈUnited States agerard

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024