Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Arguments

x

A document, node, or node set.

Value

A character vector.

Examples

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

xml2

Parse XML

v1.3.2
GPL (>= 2)
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], Jeroen Ooms [aut], RStudio [cph], R Foundation [ctb] (Copy of R-project homepage cached as example)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.