xml_path: Retrieve the xpath to a node

Description Usage Arguments Value Examples

View source: R/xml_path.R

Description

This is useful when you want to figure out where nodes matching an xpath expression live in a document.

Usage

1

Arguments

x

A document, node, or node set.

Value

A character vector.

Examples

1
2
x <- read_xml("<foo><bar><baz /></bar><baz /></foo>")
xml_path(xml_find_all(x, ".//baz"))

xml2 documentation built on Jan. 24, 2018, 5:21 p.m.