Manual:Hooks/ImportHandleRevisionXMLTag

Details
This hook is called every time an XML tag inside a is encountered during the import process. The hook can do something with that XML and return false to prevent the importer from processing it or return true to let the importer handle.

So for example, for this XML chunk:

1 Blue

this hook would be called once for 'rev_id' and once for 'color'.


 * $importer: The WikiImporter object
 * $pageInfo: An array of xml tag names => xml tag content for the object
 * $revisionInfo: An array of xml tag names => xml tag contents for the object

Notes:

The two array parameters only contain the tags encountered up to this point by the importer. They will later be used to construct the revision and page objects to be inserted into the database. There is currently no way to access the name of the tag currently being processed or the contents of the tag being processed. Neither value is passed in to the hook and they're stored in private member variables of the importer meaning they can't be accessed from a hook function.