Skip to content
Snippets Groups Projects
Commit 6b6c11f3 authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Ivan Doroshenko
Browse files

Issue #3276619 by Matroskeen: Document XML parsers and explain the difference between them

parent aa94a699
No related branches found
No related tags found
1 merge request!8Issue #3229479: Entity_lookup taxonomy_term restricted by VID
...@@ -10,6 +10,11 @@ use Drupal\migrate_plus\DataParserPluginBase; ...@@ -10,6 +10,11 @@ use Drupal\migrate_plus\DataParserPluginBase;
/** /**
* Obtain XML data for migration using the SimpleXML API. * 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( * @DataParser(
* id = "simple_xml", * id = "simple_xml",
* title = @Translation("Simple XML") * title = @Translation("Simple XML")
......
...@@ -10,6 +10,11 @@ use Drupal\migrate_plus\DataParserPluginBase; ...@@ -10,6 +10,11 @@ use Drupal\migrate_plus\DataParserPluginBase;
/** /**
* Obtain XML data for migration using the XMLReader pull parser. * 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( * @DataParser(
* id = "xml", * id = "xml",
* title = @Translation("XML") * title = @Translation("XML")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment