Closed (fixed)
Project:
Datasources
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2011 at 12:44 UTC
Updated:
19 Apr 2011 at 15:14 UTC
Hi, I want to parse simple xml files
Could you give some advice how to start an own submodule?
TIA
Comments
Comment #1
quazardous commentedhi,
- duplicate the datasources_dummy
- modify the hook_datasource_inputs() to match your need (ie : describe your basic Xml record). Of course if u have time and motivation you could create a generic module to describe all kind of XML files...
You must provide at least 1 udid field that will be the functional key for your records. So maybe You have to implement hook_udid_datasources() to declare a new udid datasource (I provide a dummy udid but...).
- provide a DatasourceEngine class that implements at least the getRecord() method that match the hook definition. This method will read your XML file and fetch records...
was it helpfull ?
Comment #2
quazardous commented