diff --git a/src/Plugin/migrate_plus/data_parser/SimpleXml.php b/src/Plugin/migrate_plus/data_parser/SimpleXml.php index 0d6eb9ec49dcf78c838435109c84e32cfd15d4be..5f86b8bc09f0601f1889fa5969137406e9958b66 100644 --- a/src/Plugin/migrate_plus/data_parser/SimpleXml.php +++ b/src/Plugin/migrate_plus/data_parser/SimpleXml.php @@ -10,6 +10,11 @@ use Drupal\migrate_plus\DataParserPluginBase; /** * Obtain XML data for migration using the SimpleXML API. * + * SimpleXML parses the whole file into memory, which allows using XPath + * expression in the item selector. For large XML sources it results in + * consuming lots of memory, which can be undesirable. If you run into memory + * issues, then consider using the 'xml' data parser. + * * @DataParser( * id = "simple_xml", * title = @Translation("Simple XML") diff --git a/src/Plugin/migrate_plus/data_parser/Xml.php b/src/Plugin/migrate_plus/data_parser/Xml.php index ead05917b9eb17138a3766c2966727510637b17c..580df846941c498fa3394c914ef18675fde0327f 100644 --- a/src/Plugin/migrate_plus/data_parser/Xml.php +++ b/src/Plugin/migrate_plus/data_parser/Xml.php @@ -10,6 +10,11 @@ use Drupal\migrate_plus\DataParserPluginBase; /** * Obtain XML data for migration using the XMLReader pull parser. * + * XMLReader reader performs incremental parsing of an XML file. This allows + * parsing very large XML sources (e.g. 200MB WordPress dumps), which reduces + * the memory usage and increases the performance. The disadvantage is that it's + * not possible to use XPath search across the entire source. + * * @DataParser( * id = "xml", * title = @Translation("XML")