This project is not covered by Drupal’s security advisory policy.

Dependencies for both the D7 and the D8 version have changed as of April 9th, 2020 due to a security vulnerability discovered in SA-CONTRIB-2019-083. Please review the release notes for information on how to upgrade and backwards incompatibilities.

A set of extensible parsers for Feeds.

Provided parsers

  • XPath XML & HTML
  • JSONPath JSON & JSON lines parser *
  • JMESPath JSON & JSON lines parser *
  • QueryPath XML & HTML *

* Requires additional libraries or modules.

Proposed parsers

  • QueryPath JSON parser
  • If you have an idea for other parsers that would make sense in this module, create an issue.

Dependencies

Some parsers require additional libraries or modules.

Parser(s) D9/D10 requirements D7 requirements
XPath XML & HTML none none
JSONPath JSON & JSON lines parser
JMESPath JSON & JSON lines parser
QueryPath XML & HTML

Installation (D8+)

With composer

If you install this module through Composer, all required libraries will be automatically downloaded.

Without composer

If you can't use Composer for whatever reason, the libraries required by this module can also be installed with the Ludwig module. Install that module and then go to /admin/reports/packages for further instructions.

Installation (D7)

JSONPath

To use the JSONPath parser, you'll need PHP >= 5.4.

There are two ways to install it:

  1. Without composer:
  2. With composer, in sites/all/libraries:
    $ git clone https://github.com/FlowCommunications/JSONPath.git jsonpath
    $ cd jsonpath
    $ composer install --no-dev
    $ drush cc all # Or just clear the cache however you normally would.
    

See the JSONPath expression tester.

JMESPath

The library for the JMESPath parsers can only be installed with Composer and requires PHP >= 5.4.

In sites/all/libraries:

$ git clone https://github.com/mtdowling/jmespath.php.git
$ cd jmespath.php
$ composer install --no-dev
$ drush cc all # Or just clear the cache however you normally would.

Check out http://jmespath.org for documentation and an expression tester.

QueryPath

To use the QueryPath parsers, download and enable the QueryPath module.

Development

To run tests of the D7 version locally, the TUnit module is required.
One of the goals of this module is to allow other developers to easily create certain types of parsers. For example, it should be trivial to create a parser for a specific XML format.

Documention has been started, but still needs work.

History

This is the new home for:

The above modules are all in various states of maintenance. This project is meant to combine them so that they can benefit from each other's development and simplify maintenance. There are also some major architectural changes.

There is no upgrade path for the old modules. It remains on the table, but those modules should continue to work. See #2376645: Please mark all old project as deprecated and provide an upgrade path

Supporting organizations: 

Project information

Releases