Generic XML Parser Plugin
Plugin source location:
This plugin is used to parse arbitrary XML data structures. It uses regular expressions as a configuration parameter to match translatable nodes in the XML DOM tree, and to identify the nodes whose content needs to be treated as HTML which needs to be parsed additionally using the parse_php_xhtml parser.
In case XML format validation fails, the plugin can send an error report to specified recipients. If no email settings are provided, it will simply report the error in the console output.
Please see the example configuration file below to learn why only
title and certain
description nodes are extracted here for translation.
When XML document is parsed, each node in it is given its path, and this path is what
path_doesnt_match regular expressions should match against (see the example configuration file). This is how the paths are constructed, given the example JSON file above:
The constructed path to a node is also extracted as a hint along with the corresponding string.