xpath: Evaluate xpath Expression

Description Usage Arguments Details Value Methods (by class) Examples

Description

Evaluates an xpath expression.

Coerces x to xml_document and evaluates.

Evaluates an xpath expression for a given document.

Usage

1
2
3
4
5
6
7
xpath(x, ...)

## Default S3 method:
xpath(x, ...)

## S3 method for class 'xml_document'
xpath(x, xpath, ...)

Arguments

x

xml_document

...

passed arguments

xpath

xpath expression to evaluate

Details

The resulting nodeset is scavenged for text, and coerced to best of numeric or character.

The resulting nodeset is scavenged for text, and coerced to best of numeric or character.

Value

vector

vector

Methods (by class)

Examples

1
2
3
library(magrittr)
options(project = system.file('project/model',package='partab'))
1001 %>% xpath('//etashrink/row/col')

bergsmat/partab documentation built on May 12, 2019, 3:09 p.m.