diff --git a/src/Plugin/migrate_plus/data_parser/SimpleXml.php b/src/Plugin/migrate_plus/data_parser/SimpleXml.php index 2e51c9a0f3e34cb9013d251527ea692835ee50b4..a33b6a086901abf74cfd0a86bcddc177fbcfd66b 100644 --- a/src/Plugin/migrate_plus/data_parser/SimpleXml.php +++ b/src/Plugin/migrate_plus/data_parser/SimpleXml.php @@ -67,7 +67,12 @@ class SimpleXml extends DataParserPluginBase { if ($target_element !== FALSE && !is_null($target_element)) { foreach ($this->fieldSelectors() as $field_name => $xpath) { foreach ($target_element->xpath($xpath) as $value) { - $this->currentItem[$field_name][] = (string) $value; + if ($value->children() && !trim((string) $value)) { + $this->currentItem[$field_name] = $value; + } + else { + $this->currentItem[$field_name][] = (string) $value; + } } } // Reduce single-value results to scalars.