parameters¶
This key contains parameters definition. You should declare it in the following way:
{
name: "gtop",
parameters: {
title: "//title"
}
}
This key is obligatory.
You can also use the parameters key to define nested parameters collections. XPath, defined in such collections, is executed in the parent context. For example:
{
name: "category",
parameters: {
subtitle: {
xpath: "//li[@class=\"cat_active\"]",
parameters: {
title: ".//strong",
count: ".//span"
}
}
}
}
Pay attention to the syntax when defining variables in the nested parameters collection - you should use period ( . ) before such nested parameters definitions. If XPath defined in the parent parameters does not exist, nested parameters collections are not processed.
Usage examples¶
Example 1:Using Nested Parameters Collections
Shows how to use nested parameters collections.