Learn R Programming

xml2 (version 1.3.3)

xml_path: Retrieve the xpath to a node

Description

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

Usage

xml_path(x)

Value

A character vector.

Arguments

x

A document, node, or node set.

Examples

Run this code
x <- read_xml("")
xml_path(xml_find_all(x, ".//baz"))

Run the code above in your browser using DataLab