Index
The XML data engine
Interface to an XML file. It uses the SimpleXML object to access the underlying XML file. The default options are arranged to parse standard atom 1 feeds, although the "fields_xpath" property should be anyway explicitely configured.
The "path" property of TIP_Data should specify a file path relative to the data root directory or an absolute URI beginning with "http://".
The XML data engine provides a basic SQL filtering, allowing the following query syntax:
[WHERE field {=|<>|>|<} value] [LIMIT length[,offset]]
so the following tags are all valids:
{forSelect(LIMIT 20,40)}...{}
{forSelect(WHERE rating > 123}...{}
{forSelect(WHERE id=abcde LIMIT 1)}...{}
{forSelect(WHERE title <> 0)}...{}
while the ones are not valid (this can change in the future):
{forSelect(ORDER BY id)}...{}
{forSelect(WHERE title LIKE abc}...{}
{forSelect(WHERE rating IS NULL)}...{}
{forSelect(WHERE raters < > 4)}...{}
The base XPath to use while filtering rows (defaults '/feed')
The row XPath, relative to the $base_xpath: it defaults to 'entry'
An associative array of 'fieldid' => 'XPath', relative to $row_path
The field id of the parent: leave it null for plain models
Ensures the required 'fields_xpath' option is defined
Constructor
Initializes a TIP_XML instance.
$options inherits the TIP_Type properties, and add the following: * $options['base_xpath']: the base xpath, that is the containerof the rows (default is '/feed')
base_xpath (defaults is 'entry')
where at least one field must be defined