Learn R Programming

thredds (version 0.1-4)

xml_id: 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"))

Value

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

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