getIds: Get external links and internal identifiers

Description Usage Arguments Value

View source: R/ids.R

Description

These functions get all the hyper-link nodes or values or the identities of any node that has an id attribute. These can be used to verify the hyper-links and to ensure that links to internal nodes correspond to actual identifiers.

Usage

1
2
3
getLinks(doc, nodes = FALSE)

getIds(doc, nodes = FALSE)

Arguments

doc

the XML document to be processed. This can be either the file name (or URL) or the already parsed XML document returned from xmlParse .

nodes

a logical value indicating whether one wants the nodes to be returned or the value of the links or identifiers as strings.

Value

if nodes is TRUE, a NodeSet object which is a list of the matching nodes. If nodes is FALSE, the actual values for the links, i.e. the url attribute, or the identifier, i.e. the id attribute.


omegahat/XDocTools documentation built on May 24, 2019, 1:57 p.m.