1 # This migration demonstrates importing from a monolithic XML file.
3 label: XML feed of roles (positions)
8 # We use the XML data parser plugin.
10 data_fetcher_plugin: http
11 data_parser_plugin: xml
12 # Normally, this is one or more fully-qualified URLs or file paths. Because
13 # we can't hardcode your local URL, we provide a relative path here which
14 # hook_install() will rewrite to a full URL for the current site.
16 - /migrate_example_advanced_position?_format=xml
17 # Visit the URL above (relative to your site root) and look at it. You can see
18 # that <response> is the outer element, and each item we want to import is a
19 # <position> element. The item_xpath value is the xpath to use to query the
21 item_selector: /response/position
22 # Under 'fields', we list the data items to be imported. The first level keys
23 # are the source field names we want to populate (the names to be used as
24 # sources in the process configuration below). For each field we're importing,
25 # we provide a label (optional - this is for display in migration tools) and
26 # an xpath for retrieving that value. It's important to note that this xpath
27 # is relative to the elements retrieved by item_xpath.
31 label: 'Unique position identifier'
35 label: 'Position name'
37 # Under 'ids', we identify source fields populated above which will uniquely
38 # identify each imported item. The 'type' makes sure the migration map table
39 # uses the proper schema type for stored the IDs.
44 # Note that the source field names here (machine_name and friendly_name) were
45 # defined by the 'fields' configuration for the source plugin above.
49 plugin: entity:user_role
50 migration_dependencies: {}
54 - migrate_example_advanced