xml_id: Retrieve an ID value for a node from it's attributes.

View source: R/misc.R

xml_idR Documentation

Retrieve an ID value for a node from it's attributes.

Description

Retrieve an ID value for a node from it's attributes.

Usage

xml_id(x, atts = c("name", "title", "ID", "urlPath", "href"))

Arguments

x

xml node or a named character vector as per xml_attrs

atts

character, ordered vector of attribute names to use as an ID value As the list is stepped through if an attribute is missing or empty character then advance to the next, otherwise return that value

Value

character identifier, possibly an empty character (character())


thredds documentation built on Sept. 1, 2023, 5:08 p.m.