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