Hi, I want to parse simple xml files

Could you give some advice how to start an own submodule?

TIA

Comments

quazardous’s picture

hi,

- 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 ?

quazardous’s picture

Status: Active » Closed (fixed)