Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
migrate_plus
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
migrate_plus
Commits
6b6c11f3
Commit
6b6c11f3
authored
2 years ago
by
Ivan Doroshenko
Committed by
Ivan Doroshenko
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
!8
Issue #3229479: Entity_lookup taxonomy_term restricted by VID
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Plugin/migrate_plus/data_parser/SimpleXml.php
+5
-0
5 additions, 0 deletions
src/Plugin/migrate_plus/data_parser/SimpleXml.php
src/Plugin/migrate_plus/data_parser/Xml.php
+5
-0
5 additions, 0 deletions
src/Plugin/migrate_plus/data_parser/Xml.php
with
10 additions
and
0 deletions
src/Plugin/migrate_plus/data_parser/SimpleXml.php
+
5
−
0
View file @
6b6c11f3
...
@@ -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")
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/migrate_plus/data_parser/Xml.php
+
5
−
0
View file @
6b6c11f3
...
@@ -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")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment