Commit 1ffc1b6a authored by Ivan Doroshenko's avatar Ivan Doroshenko
Browse files

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

parent 66149067
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -8,6 +8,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")
+5 −0
Original line number Diff line number Diff line
@@ -8,6 +8,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")