match

Back
Download exampleRun example
Replaces the returned array labels with corresponding values of each DOM element's source returned by the xpath query

Context: //app/filters/ob/filter/match

Remarks:
- function will return an associative array: array(name => "john", location=>"My City",product=> "My Product"); this is mandatory;
- array labels will be automatically enclosed between AWS_ITERATOR_MATCH_PREFIX and AWS_ITERATOR_MATCH_SUFFIX, then the replacement is made
- AWS_ITERATOR_MATCH_PREFIX and AWS_ITERATOR_MATCH_SUFFIX are defined in defaults.php;
- filter node's first processing instruction holds the function code;
- match node text content holds xpath;
Setting up the string to be replaced
Setting up the callback function code

Setting up the document entities - watch youtube video