Projet

Général

Profil

Paste
Télécharger (1,2 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / feeds_xpathparser / feeds_xpathparser.module @ f066bdb5

1
<?php
2

    
3
/**
4
 * @file
5
 * Parse an XML or HTML document using XPath.
6
 */
7

    
8
/**
9
 * Implements hook_feeds_plugins().
10
 */
11
function feeds_xpathparser_feeds_plugins() {
12
  return array(
13
    'FeedsXPathParserBase' => array(
14
      'hidden' => TRUE,
15
      'handler' => array(
16
        'parent' => 'FeedsParser',
17
        'class' => 'FeedsXPathParserBase',
18
        'file' => 'FeedsXPathParserBase.inc',
19
      ),
20
    ),
21
    'FeedsXPathParserHTML' => array(
22
      'name' => t('XPath HTML parser'),
23
      'description' => t('Parse HTML using XPath.'),
24
      'handler' => array(
25
        'parent' => 'FeedsXPathParserBase',
26
        'class' => 'FeedsXPathParserHTML',
27
        'file' => 'FeedsXPathParserHTML.inc',
28
      ),
29
    ),
30
    'FeedsXPathParserXML' => array(
31
      'name' => t('XPath XML parser'),
32
      'description' => t('Parse XML using XPath.'),
33
      'handler' => array(
34
        'parent' => 'FeedsXPathParserBase',
35
        'class' => 'FeedsXPathParserXML',
36
        'file' => 'FeedsXPathParserXML.inc',
37
      ),
38
    ),
39
  );
40
}
41

    
42
/**
43
 * Implements hook_hook_info().
44
 */
45
function feeds_xpathparser_hook_info() {
46
  $hooks = array();
47
  $hooks['feeds_xpathparser_filter_domnode'] = array(
48
    'group' => 'feeds_xpathparser',
49
  );
50

    
51
  return $hooks;
52
}