You are here

public function Xml::addField in Views XML Backend 8

Adds a new field to be queried.

Parameters

string $field: The field name.

string $xpath: The XPath selector to query the field value.

File

src/Plugin/views/query/Xml.php, line 249
Contains \Drupal\views_xml_backend\Plugin\views\query\Xml.

Class

Xml
Views query plugin for an XML query.

Namespace

Drupal\views_xml_backend\Plugin\views\query

Code

public function addField($field, $xpath) {
  $this->extraFields[$field] = $xpath;
}