You are here

protected property Xml::$parentXpathCache in Migrate Plus 8.2

Same name and namespace in other branches
  1. 8.5 src/Plugin/migrate_plus/data_parser/Xml.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml::parentXpathCache
  2. 8.3 src/Plugin/migrate_plus/data_parser/Xml.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml::parentXpathCache
  3. 8.4 src/Plugin/migrate_plus/data_parser/Xml.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Xml::parentXpathCache

Retains all elements with a given name to support extraction from parents.

This is a hack to support field extraction of values in parents of the 'context node' - ie, if $this->fields() has something like '..\nid'. Since we are using a streaming xml processor, it is too late to snoop around parent elements again once we've located an element of interest. So, grab elements with matching names and their depths, and refer back to it when building the source row.

Type: array

File

src/Plugin/migrate_plus/data_parser/Xml.php, line 70

Class

Xml
Obtain XML data for migration using the XMLReader pull parser.

Namespace

Drupal\migrate_plus\Plugin\migrate_plus\data_parser

Code

protected $parentXpathCache = [];